emacs-devel
[Top][All Lists]
Advanced

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

Re: Stupid git!


From: Stefan Monnier
Subject: Re: Stupid git!
Date: Mon, 14 Sep 2015 08:38:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> 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 don't think this problem exists: the merge code never tries to merge
changes into local uncommitted changes (staged or not).  The merge
doesn't even start if a file has both uncommitted changes and incoming
changes.


        Stefan


PS: At least that's my experience, based on looking for ways to do
exactly that, since I like to live dangerously and would be really happy
if git let me do this.  Instead I wrote a "git-merge-force" script which
does stash+merge+unstash, with the major downside that the stash+unstash
ends up "touch"ing all the locally modified files.  So if I have many of
them and the merge only touches a could files, that's a lot of wasted
work in the subsequent "make".



reply via email to

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