{"thread":{"id":"19159","subject":"reverting a file or files back to repository copy","startedAt":"2009-05-02T14:54:41Z","lastAt":"2009-05-02T15:33:07Z","messageCount":3,"participants":["Aaron Gray","Peter Harris","Markus Heidelberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112878","messageId":"137A749092D040488A7F25B4CA5ED1DC@HPLAPTOP","threadId":"19159","inReplyTo":null,"subject":"reverting a file or files back to repository copy","fromName":"Aaron Gray","fromEmail":"aaronngray.lists@googlemail.com","sentAt":"2009-05-02T14:54:41Z","receivedAt":"2009-05-02T14:54:41Z","isPatch":false,"sender":{"key":"aaronngray.lists@googlemail.com","avatar":null},"body":"How do I do the eqivalent of an 'svn revert' on a single file, on a \ndirectory of files, or on all files ?\n\nI found 'git reset --hard HEAD' but it seems like a hammer to crack open a \nnut.\n\nMany thanks in advance,\n\nAaron\n"},{"id":"112879","messageId":"eaa105840905020825v561f610dj99b1b00581bf1b3d@mail.gmail.com","threadId":"19159","inReplyTo":"137A749092D040488A7F25B4CA5ED1DC@HPLAPTOP","subject":"Re: reverting a file or files back to repository copy","fromName":"Peter Harris","fromEmail":"git@peter.is-a-geek.org","sentAt":"2009-05-02T15:25:37Z","receivedAt":"2009-05-02T15:25:37Z","isPatch":false,"sender":{"key":"git@peter.is-a-geek.org","avatar":null},"body":"On Sat, May 2, 2009 at 10:54 AM, Aaron Gray wrote:\n> How do I do the eqivalent of an 'svn revert' on a single file, on a\n> directory of files, or on all files ?\n\ngit checkout <files>\n\nPeter Harris\n"},{"id":"112880","messageId":"200905021733.08557.markus.heidelberg@web.de","threadId":"19159","inReplyTo":"eaa105840905020825v561f610dj99b1b00581bf1b3d@mail.gmail.com","subject":"Re: reverting a file or files back to repository copy","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-05-02T15:33:07Z","receivedAt":"2009-05-02T15:33:07Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Peter Harris, 02.05.2009:\n> On Sat, May 2, 2009 at 10:54 AM, Aaron Gray wrote:\n> > How do I do the eqivalent of an 'svn revert' on a single file, on a\n> > directory of files, or on all files ?\n> \n> git checkout <files>\n\nThis will use the state of the files from the index.\nTo revert to the latest commit, i.e. discard all your local changes of\nparticular files, use\n\n    git checkout HEAD -- <files>\n\nMarkus\n"}]}