git fetch --all git reset --hard origin/master
git reset HEAD .
git checkout -- .
交互模式git
git clean -i
git push origin -d branch_name
git branch -d branch_name
git checkout -b 本地分支名x origin/远程分支名x
git reset --soft commit # 回退到某个 commit 并保留目前的版本到暂存区 git reset commit # 回退到某个 commit 并保留目前的版本到工做目录 git reset --hard commit # 回退到某个 commit 并丢弃暂存区和工做目录 git push -f -u origin master # 将回退的版本强制提交到远程服务器