Skip to main content

Force git pull from remote

If you want to discard the commits you've made locally, i.e. never have them in the history again, you can just do a hard reset:

# fetch from the default remote, origin
git fetch
# reset your current branch (master) to origin's master
git reset --hard origin/master