fetch所有分支上的内容,也可以选择只备份一部分内容

 
git fetch --all
 
重置本地分支(这里master要修改为对应的分支名)
 
git reset --hard origin/master
 
git pull