Re: Help reverting a particular file

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

 



Eric Raible, Tue, Aug 12, 2008 01:33:17 +0200:
> Bryan Richardson <btricha <at> gmail.com> writes:
> > 
> > Can anyone tell me how to revert a particular file using git?  I
> > executed a commit, then froze my Rails application to the latest Rails
> > version.  This caused my custom config/boot.rb file to be overwritten
> > and I would like to restore it without rolling back to the previous
> > commit (which would roll back the rails freeze).  In general I need to
> > know how to do this anyway. :)
> > 
> 
> See corresponding man page for full details, but briefly:
> 
> # Updates index as well
> git checkout HEAD^ -- config/boot.rb
> 

That'd revert it to the _previous_ commit, not the current, while he
seems to need the recently committed state in his working tree:

  git checkout HEAD -- config/boot.rb


--
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