git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* got myself into trouble; now what? - how to revert once you've pushed
@ 2011-03-01 19:37 Robert Buck
  2011-03-01 19:50 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Buck @ 2011-03-01 19:37 UTC (permalink / raw)
  To: git@vger.kernel.org List

I have a problem where a unexpected merge occurred and got pushed to
our Gitolite repository.

We have two branches: master, feature/wixinstall

Apparently a merge happened from the branch to master (and I am pretty
sure I never typed `git merge...`). But alas, a merge somehow happened
and got pushed.

Then I followed the Git Pro documentation, which said to do this...

    git revert -m 1 [sha_of_C8]

Now I am left with a bigger mess. When I merge master to the branch,
all the newly added files on the branch got deleted (not what I
wanted). Somehow git is interpreting the revert literally as a
sequence of deletes which it incorrectly then applies to the work on
the branch.

What I really wanted the revert to do is restore the history of the
world immediately prior to the merge. But now I have a branch I can't
merge into at all without losing a weeks work.

How can I get out of this mess?

Bob

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

end of thread, other threads:[~2011-03-02 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 19:37 got myself into trouble; now what? - how to revert once you've pushed Robert Buck
2011-03-01 19:50 ` Jeff King
2011-03-02 13:10   ` Robert Buck
2011-03-02 13:37     ` Jeff King
2011-03-02 15:52       ` Jon Seymour

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).