git 基本撤销

撤消刚才的提交操作,可以使用 --amend 选项重新提交:

git commit --amend

在执行命令前将漏掉的文件增加进去

 

取消已经暂存的文件

git reset HEAD filename

取消对文件的修改

git checkout -- filename

储藏并应用你的工作

git stash

# 产看stash
git stash list

# 应用stash
git stash apply

# 应用stash并删除stash
git stash pop

 

 

 

原文地址:https://www.cnblogs.com/kamechen/p/2563835.html