Re: Considering teaching plumbing to users harmful

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

 



On Thu, Jul 17, 2008 at 03:35:22PM +0200, Peter Valdemar Mørch wrote:
> E.g. something I seem to succeed with sometimes, but not consistently is  
> the equivalent of "svn revert -R .". "git help reset"? Yup: "git reset  
> --hard HEAD ." When I run into merge conflicts, I'll probably look at  
> such a doc again, but other than that I'll probably use man pages most.

You find quick alias to be a useful replacement for "svn revert -R
<file>" (aka "hg revert <file>" and "bg revert <file>"):

git config --global alias.revert-file "checkout HEAD --"

Once you run this command, you can now do "git revert-file <file>"
which I personally find very handy.  Sometimes I only want to revert
one file, and not all of the files in the working directory, which is
what "git reset --hard" will do.

(Note that "git revert" does something else useful, but which is not
the same as "hg revert", "bk revert" and "svn revert". Oh well, nobody
ever said DSCM's had to be consistent.)

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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