svn revert equivalent in git

I keep wanting to type

git revert

to roll back changes to the last committed version of something—that’s how you’d do it in Subversion—but this isn’t right. This works instead:

git reset --hard HEAD

This entry was posted in howto, Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>