{"thread":{"id":"14945","subject":"Help reverting a particular file","startedAt":"2008-08-11T23:00:41Z","lastAt":"2008-08-12T06:15:38Z","messageCount":3,"participants":["Bryan Richardson","Eric Raible","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"86850","messageId":"3f81a4240808111600u78c5eeefu588a6b1250a0dd02@mail.gmail.com","threadId":"14945","inReplyTo":null,"subject":"Help reverting a particular file","fromName":"Bryan Richardson","fromEmail":"btricha@gmail.com","sentAt":"2008-08-11T23:00:41Z","receivedAt":"2008-08-11T23:00:41Z","isPatch":false,"sender":{"key":"btricha@gmail.com","avatar":null},"body":"Hello all,\n\nCan anyone tell me how to revert a particular file using git?  I\nexecuted a commit, then froze my Rails application to the latest Rails\nversion.  This caused my custom config/boot.rb file to be overwritten\nand I would like to restore it without rolling back to the previous\ncommit (which would roll back the rails freeze).  In general I need to\nknow how to do this anyway. :)\n\nPlease help!\n\n--\nThanks!\nBryan\n"},{"id":"86856","messageId":"loom.20080811T232642-623@post.gmane.org","threadId":"14945","inReplyTo":"3f81a4240808111600u78c5eeefu588a6b1250a0dd02@mail.gmail.com","subject":"Re: Help reverting a particular file","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2008-08-11T23:33:17Z","receivedAt":"2008-08-11T23:33:17Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"Bryan Richardson <btricha <at> gmail.com> writes:\n\n> \n> Hello all,\n> \n> Can anyone tell me how to revert a particular file using git?  I\n> executed a commit, then froze my Rails application to the latest Rails\n> version.  This caused my custom config/boot.rb file to be overwritten\n> and I would like to restore it without rolling back to the previous\n> commit (which would roll back the rails freeze).  In general I need to\n> know how to do this anyway. :)\n> \n> Please help!\n> \n> --\n> Thanks!\n> Bryan\n> \n\nSee corresponding man page for full details, but briefly:\n\n# Updates index as well\ngit checkout HEAD^ -- config/boot.rb\n\nor\n\n# Output can be redirected\ngit show HEAD^:config/boot.rb\n\n- Eric\n"},{"id":"86902","messageId":"20080812061538.GA3824@blimp.local","threadId":"14945","inReplyTo":"loom.20080811T232642-623@post.gmane.org","subject":"Re: Help reverting a particular file","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-08-12T06:15:38Z","receivedAt":"2008-08-12T06:15:38Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Eric Raible, Tue, Aug 12, 2008 01:33:17 +0200:\n> Bryan Richardson <btricha <at> gmail.com> writes:\n> > \n> > Can anyone tell me how to revert a particular file using git?  I\n> > executed a commit, then froze my Rails application to the latest Rails\n> > version.  This caused my custom config/boot.rb file to be overwritten\n> > and I would like to restore it without rolling back to the previous\n> > commit (which would roll back the rails freeze).  In general I need to\n> > know how to do this anyway. :)\n> > \n> \n> See corresponding man page for full details, but briefly:\n> \n> # Updates index as well\n> git checkout HEAD^ -- config/boot.rb\n> \n\nThat'd revert it to the _previous_ commit, not the current, while he\nseems to need the recently committed state in his working tree:\n\n  git checkout HEAD -- config/boot.rb\n"}]}