emacs-devel
[Top][All Lists]
Advanced

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

Re: Stupid git!


From: Sven Axelsson
Subject: Re: Stupid git!
Date: Sun, 13 Sep 2015 08:22:26 +0200

On 12 September 2015 at 23:51, Alan Mackenzie <address@hidden> wrote:
> Hello, Dmitry.
>
> On Sat, Sep 12, 2015 at 11:43:43PM +0300, Dmitry Gutov wrote:
>> On 09/12/2015 11:36 PM, Alan Mackenzie wrote:
>
>> > I just did `git pull'.  This didn't merge the upstream changes into
>> > my repository.  Instead it put the upstream file change into my working
>> > directory, discarding the other contributer's change log.  If I
>> > understand correctly, that is.
>
>> What does 'git status' say?
>
> On branch master
> Your branch and 'origin/master' have diverged,
> and have 1 and 1 different commit each, respectively.
>   (use "git pull" to merge the remote branch into yours)
> All conflicts fixed but you are still merging.
>   (use "git commit" to conclude merge)
>
> Changes to be committed:
>
>         modified:   test/automated/file-notify-tests.el
>
> Changes not staged for commit:
>   (use "git add <file>..." to update what will be committed)
>   (use "git checkout -- <file>..." to discard changes in working
> directory)
>
>         modified:   .gitignore
>         modified:   lisp/textmodes/paragraphs.el
>         modified:   src/search.c
>
>> > I think the best thing for me to do now is `git checkout <file>' to
>> > revert that changed file,
>
>> If you're in the middle of a merge, it's a recipe for disaster.
>
> :-).  OK, but the immediate problem is that _I_ didn't modify
> file-notify-tests.el.  Somebody else did, and git put his changes into
> my working directory and `git add'ed it.  I don't have the log entry for
> this change.  So am I supposed to just commit this, with my own log
> entry?
>
> I don't really understand what "you are still merging" is supposed to
> mean.  How do I get out of the "merging" state cleanly, without
> commiting somebody else's changes?
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>

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

-- 
Sven Axelsson
++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
>++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.



reply via email to

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