All of lore.kernel.org
 help / color / mirror / Atom feed
* how to do "git merge --abort"
@ 2009-08-21 14:51 bill lam
  2009-08-21 15:19 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: bill lam @ 2009-08-21 14:51 UTC (permalink / raw)
  To: git

How to abort a merge if it said there are conflicts but I do not want
to (or can not) resolve it for the moment.  I can not find the --abort
option as that for git-rebase.

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

* Re: how to do "git merge --abort"
  2009-08-21 14:51 how to do "git merge --abort" bill lam
@ 2009-08-21 15:19 ` Jeff King
  2009-08-21 15:26   ` Thomas Rast
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2009-08-21 15:19 UTC (permalink / raw)
  To: git

On Fri, Aug 21, 2009 at 10:51:57PM +0800, bill lam wrote:

> How to abort a merge if it said there are conflicts but I do not want
> to (or can not) resolve it for the moment.  I can not find the --abort
> option as that for git-rebase.

It is spelled "git reset --merge" (though --merge was introduced in
v1.6.1; prior to that, you had to use "git reset --hard").

I don't know if it is worth adding "git merge --abort" as syntactic
sugar.

-Peff

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

* Re: how to do "git merge --abort"
  2009-08-21 15:19 ` Jeff King
@ 2009-08-21 15:26   ` Thomas Rast
  2009-08-21 15:37     ` Jeff King
  2009-08-22  1:56     ` bill lam
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Rast @ 2009-08-21 15:26 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King wrote:
> On Fri, Aug 21, 2009 at 10:51:57PM +0800, bill lam wrote:
> 
> > How to abort a merge if it said there are conflicts but I do not want
> > to (or can not) resolve it for the moment.  I can not find the --abort
> > option as that for git-rebase.
> 
> It is spelled "git reset --merge" (though --merge was introduced in
> v1.6.1; prior to that, you had to use "git reset --hard").

Umm, no, you still have to use "git reset --hard".

"git reset --merge cmt" is a rough equivalent for

  git stash
  git reset --hard cmt
  git stash pop

and fills the case where you merged with (unrelated) unstaged changes,
and want to discard the merge while keeping the changes.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

* Re: how to do "git merge --abort"
  2009-08-21 15:26   ` Thomas Rast
@ 2009-08-21 15:37     ` Jeff King
  2009-08-22  1:56     ` bill lam
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff King @ 2009-08-21 15:37 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git

On Fri, Aug 21, 2009 at 05:26:19PM +0200, Thomas Rast wrote:

> > It is spelled "git reset --merge" (though --merge was introduced in
> > v1.6.1; prior to that, you had to use "git reset --hard").
> 
> Umm, no, you still have to use "git reset --hard".

Ah, sorry, you are right. I have never actually used "--merge", but I
knew based on this thread:

  http://article.gmane.org/gmane.comp.version-control.git/102067

that the point was to carry dirty state across a reset. So I assumed you
could use it to reset a failed merge while leaving dirty state in files
unrelated to the merge. But it doesn't actually handle unmerged entries
at all.

Thanks for correcting me.

The downside, of course, of "git reset --hard" is that it kills off any
dirty state you may have wanted to keep.

-Peff

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

* Re: how to do "git merge --abort"
  2009-08-21 15:26   ` Thomas Rast
  2009-08-21 15:37     ` Jeff King
@ 2009-08-22  1:56     ` bill lam
  1 sibling, 0 replies; 5+ messages in thread
From: bill lam @ 2009-08-22  1:56 UTC (permalink / raw)
  To: git

Thanks to both of you. I'll try it when the next merge conflicts.

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

end of thread, other threads:[~2009-08-22  1:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 14:51 how to do "git merge --abort" bill lam
2009-08-21 15:19 ` Jeff King
2009-08-21 15:26   ` Thomas Rast
2009-08-21 15:37     ` Jeff King
2009-08-22  1:56     ` bill lam

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.