emacs-devel
[Top][All Lists]
Advanced

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

Re: VC mode and git


From: Stephen J. Turnbull
Subject: Re: VC mode and git
Date: Tue, 31 Mar 2015 18:24:46 +0900

Alan Mackenzie writes:

 > That is the case in the current git version.  I think that in previous
 > versions, git took the liberty of simply overwriting changed files in
 > the workspace.

git has never done that, and never will (if it does, there will
immediately be a fork that doesn't and all sane users will switch).

git reset --hard will do that, and there may be a --force option to
checkout that will do that.  But you have to explicitly request git to
overwrite files that are not in the state that git last committed
them, and as far as I know merge never does that.  (There may be
circumstances where it will do a 3-way merge on an uncommitted file,
but normally it will balk, and always has done so AFAICR.)

Note that all VCSes have the equivalent of git reset --hard.

 > Why can't git simply merge changes properly into the workspace, thus
 > saving users the unwelcome hassle of, e.g., git stash followed by git
 > merge followed by git stash pop?

It does, the same way that bzr or Mercurial does.[1]  I don't see why you
would think otherwise.


Footnotes: 
[1]  There are slight differences in algorithms, but they mostly don't
make a difference -- you'll get the same result.




reply via email to

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