Matthieu Moy <Matthieu.Moy@xxxxxxx> wrote: > What's the best way to revert individual files with git? git checkout HEAD -- fileA > To revert a whole tree, I can use "git reset --hard", but it refuses > to do a partial reset. Yes. > At the moment, I use either > > $ git diff file | patch -R -p1 > > or > > $ git show HEAD:file > file > > (followed by git-add file in both cases) > > I realize I can also do > > $ git reset HEAD file > $ git checkout file All of those also work, but as you said, are less fun to type. :-) -- Shawn. - 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