# 贮藏
$ git stash 备份当前的工作区的内容,将当前的工作区内容保存到git栈中 $ git stash list 显示git栈内所有的备份,可以利用这个列表来决定从哪个地方恢复 $ git stash apply stash@{your value} 恢复以前的状态,stash@{your value}值可以用git stash list 查看 $ git stash drop stash @{0} 这是删除第一个队列
Copied!
# 回滚
$ git log 查看之前的commit的id,找到想要还原的版本 $ git reset --hard 44bddghf455dsw4544yrydg556fdd <your commit> 还原到之前的某个版本 $ git push -f origin master <your branch> 强制push到远程分支
Copied!
# 删除分支
$ git branch -d branch-name
Copied!
v1.5.1