{"thread":{"id":"20687","subject":"how to do \"git merge --abort\"","startedAt":"2009-08-21T14:51:57Z","lastAt":"2009-08-22T01:56:49Z","messageCount":5,"participants":["bill lam","Jeff King","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"121435","messageId":"20090821145157.GA6471@debian.b2j","threadId":"20687","inReplyTo":null,"subject":"how to do \"git merge --abort\"","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-08-21T14:51:57Z","receivedAt":"2009-08-21T14:51:57Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"How to abort a merge if it said there are conflicts but I do not want\nto (or can not) resolve it for the moment.  I can not find the --abort\noption as that for git-rebase.\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n"},{"id":"121437","messageId":"20090821151926.GE6850@coredump.intra.peff.net","threadId":"20687","inReplyTo":"20090821145157.GA6471@debian.b2j","subject":"Re: how to do \"git merge --abort\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-08-21T15:19:26Z","receivedAt":"2009-08-21T15:19:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 21, 2009 at 10:51:57PM +0800, bill lam wrote:\n\n> How to abort a merge if it said there are conflicts but I do not want\n> to (or can not) resolve it for the moment.  I can not find the --abort\n> option as that for git-rebase.\n\nIt is spelled \"git reset --merge\" (though --merge was introduced in\nv1.6.1; prior to that, you had to use \"git reset --hard\").\n\nI don't know if it is worth adding \"git merge --abort\" as syntactic\nsugar.\n\n-Peff\n"},{"id":"121438","messageId":"200908211726.21593.trast@student.ethz.ch","threadId":"20687","inReplyTo":"20090821151926.GE6850@coredump.intra.peff.net","subject":"Re: how to do \"git merge --abort\"","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-08-21T15:26:19Z","receivedAt":"2009-08-21T15:26:19Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jeff King wrote:\n> On Fri, Aug 21, 2009 at 10:51:57PM +0800, bill lam wrote:\n> \n> > How to abort a merge if it said there are conflicts but I do not want\n> > to (or can not) resolve it for the moment.  I can not find the --abort\n> > option as that for git-rebase.\n> \n> It is spelled \"git reset --merge\" (though --merge was introduced in\n> v1.6.1; prior to that, you had to use \"git reset --hard\").\n\nUmm, no, you still have to use \"git reset --hard\".\n\n\"git reset --merge cmt\" is a rough equivalent for\n\n  git stash\n  git reset --hard cmt\n  git stash pop\n\nand fills the case where you merged with (unrelated) unstaged changes,\nand want to discard the merge while keeping the changes.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"121439","messageId":"20090821153730.GA14456@coredump.intra.peff.net","threadId":"20687","inReplyTo":"200908211726.21593.trast@student.ethz.ch","subject":"Re: how to do \"git merge --abort\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-08-21T15:37:30Z","receivedAt":"2009-08-21T15:37:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Aug 21, 2009 at 05:26:19PM +0200, Thomas Rast wrote:\n\n> > It is spelled \"git reset --merge\" (though --merge was introduced in\n> > v1.6.1; prior to that, you had to use \"git reset --hard\").\n> \n> Umm, no, you still have to use \"git reset --hard\".\n\nAh, sorry, you are right. I have never actually used \"--merge\", but I\nknew based on this thread:\n\n  http://article.gmane.org/gmane.comp.version-control.git/102067\n\nthat the point was to carry dirty state across a reset. So I assumed you\ncould use it to reset a failed merge while leaving dirty state in files\nunrelated to the merge. But it doesn't actually handle unmerged entries\nat all.\n\nThanks for correcting me.\n\nThe downside, of course, of \"git reset --hard\" is that it kills off any\ndirty state you may have wanted to keep.\n\n-Peff\n"},{"id":"121483","messageId":"20090822015649.GC3965@debian.b2j","threadId":"20687","inReplyTo":"200908211726.21593.trast@student.ethz.ch","subject":"Re: how to do \"git merge --abort\"","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-08-22T01:56:49Z","receivedAt":"2009-08-22T01:56:49Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"Thanks to both of you. I'll try it when the next merge conflicts.\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n"}]}