All of lore.kernel.org
 help / color / mirror / Atom feed
* How do I undo a fast-forward merge safely?
@ 2009-02-22 19:15 Brent Goodrick
  2009-02-22 19:54 ` Jakub Narebski
  0 siblings, 1 reply; 3+ messages in thread
From: Brent Goodrick @ 2009-02-22 19:15 UTC (permalink / raw)
  To: git

I had done a git merge --no-commit <source_branch> operation, but that
bit me because I mistakingly concluded that --no-commit would prevent
any type of automatic operation, but apparently a fast-forward
occurred.  I should have used the --no-ff option? How do I get my
target branch back to where it was before the bad merge?

I did make a backup of the entire repo before I started, so I do have
the plan-B option of replay my changes onto a copy of the backup repo.
  But, maintaining backup copies just so as to avoid getting bit each
time I forget to use the --no-ff option will be a non-starter, so I
would hope there are some safe commands I can use to go back to the
original.

git log -1 does not show the commit, but gitk does show a vertical red
line that I can only presume indicates the fast-forward.  How does
gitk determine that red line, while git-log does not?  Note that I
have not pulled into any other repo's yet, and won't until I can
rectify this issue.

Here was my bad git merge command line:

$ git merge --no-commit source_branch
Updating 7eb9a02..0c66ca1
Fast forward
<eliding list of files I want mixed in with lots of files I don't want>

So, what operations, rebase, reset, etc, do I need to do to get this
repo back to where it was right before the fast-forward?

Thanks,
Brent

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-24  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 19:15 How do I undo a fast-forward merge safely? Brent Goodrick
2009-02-22 19:54 ` Jakub Narebski
2009-02-24  5:37   ` Brent Goodrick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.