Git实用命令
撤销commit消息保留修改
git reset --soft [commit_id]
暂存修改
git stash
git stash apply
git stash list
git stash pop
git stash clear
删除恢复分支
# 删除分支
git branch -d <branch_name>
# 恢复分支
git branch <branch_name> <hash_val>
# 查看散列值
git reflog
git pull 强制覆盖本地文件
git fetch --all
git reset --hard origin/<branch_name>
git pull
拉取远程分支到本地
git checkout -b <branch_name> origin/<branch_name>