You probably want to use git reset
. Assuming you have done a git fetch
recently, the following will discard everything in your local and reset it to the point you specify as the final argument (in this case the current HEAD of the origin/master
remote tracking branch):
$ git reset --hard origin/master