Close

Git – resetting Git.

If you want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this

Announcement

I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!
git fetch origin
git reset --hard origin/master

http://git-scm.com/blog/2011/07/11/reset.html