Re: pull into dirty working tree
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 13, 2007, 15:01 UTC
- Message-ID
- <Pine.LNX.4.64.0706131559210.4059@racer.site>
- In-Reply-To
- <18031.64456.948230.375333@lisa.zopyra.com>
Hi,
On Wed, 13 Jun 2007, Bill Lear wrote:
> We have some CVS users who complain that they cannot do a pull > into a dirty working tree, as they could under CVS.
Two things you can do. First thing is: teach them to commit first. If they decide later that they did not want that change, they still can go back with "git reset HEAD@{2}".
The other thing, if you have to, is to put all dirty changes into the index before pull. Something like "git add $(git ls-files --modified)". You can even make that a global alias for your users. Although IIRC it does not work if the merge changes the same files as your dirty work tree touches, but I could very well be wrong there.
Hth, Dscho