Re: "git checkout" safety feature

2018-11-05 Thread Duy Nguyen
On Mon, Nov 5, 2018 at 7:53 AM Jeff King wrote: > > On Mon, Nov 05, 2018 at 07:24:42AM +0100, Matthias Urlichs wrote: > > > Hi, > > > "git checkout " is a feature to overwrite local > > > changes. It is what you use when you make a mess editing the files > > > and want to go back to a known

Re: "git checkout" safety feature

2018-11-04 Thread Jeff King
On Mon, Nov 05, 2018 at 07:24:42AM +0100, Matthias Urlichs wrote: > Hi, > > "git checkout " is a feature to overwrite local > > changes. It is what you use when you make a mess editing the files > > and want to go back to a known state. Why should that feature be > > destroyed? > > Not

Re: "git checkout" safety feature

2018-11-04 Thread Matthias Urlichs
Hi, > "git checkout " is a feature to overwrite local > changes. It is what you use when you make a mess editing the files > and want to go back to a known state. Why should that feature be > destroyed? Not destroyed, but optionally made finger-fumble-save – like "alias rm rm -i". -- --

Re: "git checkout" safety feature

2018-11-04 Thread Junio C Hamano
Matthias Urlichs writes: > A recent discussion on LWN https://lwn.net/Articles/770642/ noted that > "git checkout " does not warn if one if the files has > been modified locally, nor is there an option to do so. > > IMHO that should be fixed, preferably by somebody who knows git's > internals

"git checkout" safety feature

2018-11-04 Thread Matthias Urlichs
Hi, A recent discussion on LWN https://lwn.net/Articles/770642/ noted that "git checkout " does not warn if one if the files has been modified locally, nor is there an option to do so. IMHO that should be fixed, preferably by somebody who knows git's internals well enough to do so in half an