git如何刪除本地所有未提交的更改
git checkout . && git clean -xdf
一般 git clean都是配合git reset 使用的
如果你有的修改已經加入了暫存區
那么,命令
git reset --hard
git clean -xdf
git回滾到某一個版本
git reset —hard a136c6923d882ffc9065439f33412936902a1f5d
強制提交:
git push -f origin master
(三)git pull強制覆蓋本地文件
git fetch --all
git reset --hard origin/master
git pull