emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid git!


From: David Kastrup
Subject: Re: Stupid git!
Date: Mon, 14 Sep 2015 12:29:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> Hello, Sven.
>
> On Sun, Sep 13, 2015 at 08:22:26AM +0200, Sven Axelsson wrote:
>
>> `git status` tells you if you are in a merge operation, as you can
>> see from the message above. To back out and undo all changes
>> introduced by the merge, you can use `git merge --abort`.
>
> Thanks!  I'll note that down in case I even need it in the future.

I think that if you have unstaged changes (possibly in files not touched
by the merge) and start a merge (like with git pull or something), then
do git merge --abort this may well get the changes killed for good: git
merge --abort basically has only the index and repository to return to.

I actually don't use git pull much myself: I rather use git fetch and
then decide whether I want to merge or rebase or do whatever.  And then
I can choose just how I want to keep work from getting lost, by stashing
it, or putting it in a branch or whatever else.

Pulling is not a really good thing to do if you have uncommitted work.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]