[Top][All Lists]

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

Re: VC mode and git

From: Dmitry Gutov
Subject: Re: VC mode and git
Date: Tue, 31 Mar 2015 17:26:41 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 03/31/2015 05:07 PM, Eli Zaretskii wrote:
> Nothing, IME.  Contrary to the cited text, "git pull" with uncommitted
changes doesn't fail.  I do this every time before committing a
changeset I intend to push, and it always worked for me.

Neither is exactly true. Since 1.7.0 or so, "git pull" with uncommitted changes can succeed if the newly pulled changes don't touch the locally changed files, but will fail otherwise. Which makes a lot of sense.

By contrast, if you do commit, and _then_ pull, your pull might fail
to merge the new stuff from upstream, and _then_ you'd need to do
something to fix that.

If your local changes didn't touch the same files that were changed upstream, there shouldn't be any conflicts, aside from ChangeLog-related ones. Which should become no problem soon.

> (I usually just "git reset HEAD^" and pull
again, then commit my changes again, after fixing the ChangeLog
entries to be in the correct order.)

I'd usually rebase (as long as there haven't been any local merges), but that's not something we can put in the common workflow, of course.

reply via email to

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