Re: What I miss from Cogito...

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

 



On Sun, Mar 23, 2008 at 01:38:41PM -0400, Theodore Tso wrote:
> On Sun, Mar 23, 2008 at 10:15:48AM -0700, H. Peter Anvin wrote:
> > 2. cg-restore
> >
> >    Cogito separated "reset" and "restore".  This is a syntactic sugar
> >    issue, but having to type "git reset --hard -- path" makes me
> >    nervous, especially since hitting Enter at the wrong time could have
> >    serious and irrevocable consequences.
> >
> >    I also note that this particular use of "git reset" is actually
> >    undocumented, but it seems to work.
> 
> I didn't think "git reset --hard -- <pathame>" was valid, since it's
> not documented in the man page.
> 
> I have the following in my path as "git-revert-file" (which is easier
> to type and less dangerous than typing "git reset --hard -- <path>"):
> 
> #!/bin/sh
> #
> prefix=$(git rev-parse --show-prefix)
> 
> for i in $*
> do
>         git show HEAD:$prefix$i > $i
> done

I use git checkout path ...

Isn't that the same thing?

-- 
Luciano Rocha <luciano@xxxxxxxxxxx>
Eurotux Informática, S.A. <http://www.eurotux.com/>

Attachment: pgpYHJbpjExQp.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux