From: Michael J Gruber Date: Fri, 25 Feb 2011 13:05:49 GMT Subject: Re: Revert a single commit in a single file Message-ID: <4D67A92D.2000300@drmicha.warpmail.net> In-Reply-To: Dario Rodriguez venit, vidit, dixit 25.02.2011 13:48: > The most sensible way to do this seems to be: To do what? I you hadn't top posted we would know what "this" referred to. > git checkout HEAD~2 file.c > > And your index will show file.c modified, as it will have it's content > reverted 2 commits. It will have its content reset to what it was in HEAD~2. This is very different from reverting the change made in HEAD~2: > The behavior of 'revert' is to revert commits, not files, so it's not > expected to work if you say 'git revert ' It makes perfect sense, it's just not implemented. Note that you can also git show -- | git apply -R to achieve a partial revert. That might be the easiest route to take. Michael [Cutting the bottom copy - what is it good for there?]