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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…