GIT is a great thing and in general really easy to use. But sometimes you screw up things and just think "DAMN! How I can remove this or that".
Sometimes you may just want to reset a branch.

It's just that easy, but sometime you forget the easiest things ;) (I use the master branch in this example)

git checkout <any another branch except that one you want to reset to upstream status>
git branch -D master
git checkout origin/master -b master

Have fun! ;)

Next Post Previous Post