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

 

 

 

 

posted @ 2012-06-26 15:57  kamechen  阅读(243)  评论(0编辑  收藏  举报