Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2008, 17:22 UTC
- Message-ID
- <7v63rx2zwf.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080625135100.GF20361@mit.edu>
Theodore Tso <tytso@mit.edu> writes:
Show 12 quoted lines
> I used to argue for this, but gave up, because no one seemed to agree > with me. So now I just have the following in > /home/tytso/bin/git-revert-file and I am very happy: > > #!/bin/sh > # > prefix=$(git rev-parse --show-prefix) > > for i in $* > do > git show HEAD:$prefix$i > $i > done
Isn't that this?
#!/bin/sh
exec git checkout HEAD -- "$@"