1.下载远程仓库最新内容,不做合并
git fetch --all
2.回退
git reset --hard origin/master
3.记住用户名密码
git config --global credential.helper store
4.清除用户名密码
git config --system --unset credential.helper
5.清理本地存在但是服务器已经删除的分支
git remote prune origin
6. git clean -d -fx,作用是:删除没有git add 的文件 ,执行之后解决了 error: The following untracked working tree files would be overwritten by …的问题
7.清除本地写的代码 git checkout . && git clean -xdf