[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.
- Re: VC mode and git, (continued)
- Re: VC mode and git, Stephen J. Turnbull, 2015/03/31
- Re: VC mode and git, Eli Zaretskii, 2015/03/31
- Re: VC mode and git, Steinar Bang, 2015/03/31
- Re: VC mode and git, Stephen J. Turnbull, 2015/03/31
- Re: VC mode and git, Eli Zaretskii, 2015/03/31
- Re: VC mode and git, Alan Mackenzie, 2015/03/31
- Re: VC mode and git, Andreas Schwab, 2015/03/31
- Re: VC mode and git,
Stephen J. Turnbull <=
- Re: VC mode and git, Alan Mackenzie, 2015/03/31
- Re: VC mode and git, Andreas Schwab, 2015/03/31
- Re: VC mode and git, Eli Zaretskii, 2015/03/31
- Re: VC mode and git, Andreas Schwab, 2015/03/31
- Re: VC mode and git, Steinar Bang, 2015/03/31
- Re: VC mode and git, Alan Mackenzie, 2015/03/31
- Re: VC mode and git, Stephen J. Turnbull, 2015/03/31
- Re: VC mode and git, Alan Mackenzie, 2015/03/31
- Re: VC mode and git, Stephen J. Turnbull, 2015/03/31
- Re: VC mode and git, Steinar Bang, 2015/03/31