git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Howard Miller <howard@e-learndesign.co.uk>
To: git@vger.kernel.org
Subject: Commited to wrong branch
Date: Tue, 15 Sep 2009 11:31:07 +0100	[thread overview]
Message-ID: <26ae428a0909150331q391ed39ak622902d175b46d84@mail.gmail.com> (raw)

Hi,

I am resurrecting a discussion from a week or two back (been on
holiday).  As follows...

I had made some changes to some files and then done a commit. Only
then did I realise that I had the wrong branch checked out. To make
matters worse I then did a 'git reset HEAD^' which means that I can
now no longer switch branches. I am stuck. I had some advice (thanks!)
but it was not complete. I'd appreciate some more help.

I was advised to do a 'git reflog --branchname--' (I don't
know/understand what this command does) but it doesn't work. I just
get 'usage: git reflog (expire | ...)'

So basically I am no further forward. Just to reiterate I need to...

* remove the commit from my current branch (it tracks a remote so I
would prefer there to be no evidence to confuse other people after I
push)
* add the changes to the (other) branch they should have been added to.
* not loose or break anything.

Any (more) help appreciated.

             reply	other threads:[~2009-09-15 10:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:31 Howard Miller [this message]
2009-09-15 10:55 ` Commited to wrong branch Martin Langhoff
2009-09-15 11:05   ` Howard Miller
2009-09-15 11:16     ` Martin Langhoff
2009-09-15 12:10       ` Howard Miller
2009-09-15 12:46         ` Martin Langhoff
2009-09-15 12:58           ` Howard Miller
2009-09-15 13:06             ` Björn Steinbrink
2009-09-15 13:12               ` Howard Miller
2009-09-15 13:54               ` Martin Langhoff
2009-09-15 14:11                 ` Howard Miller
2009-09-15 20:39                 ` Björn Steinbrink
2009-09-15 20:52                   ` Howard Miller
2009-09-15 21:53                   ` Martin Langhoff
2009-09-15 22:30                     ` Björn Steinbrink
2009-09-15 13:27             ` Howard Miller
2009-09-15 13:45               ` Howard Miller
2009-09-15 14:08                 ` Johannes Sixt
2009-09-15 13:46               ` Martin Langhoff
2009-09-15 11:19   ` Björn Steinbrink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26ae428a0909150331q391ed39ak622902d175b46d84@mail.gmail.com \
    --to=howard@e-learndesign.co.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).