Git 其余命令

git reset HEAD demo1.html  从暂存区 撤回到工作区

git commit -a -m'注释'  简写 从工作区 -> 暂存区 -> 版本库

git log 操作历史

1. 对比 

  - git diff --- 工作区 与 暂存区 内容差别的对比

-------绿色区域就是区别代码------

 

  - git diff --cached(--staged)  --- 暂存区 与 版本库 对比  

  - git diff master【分支名】 --- 工作区 与版本库之间 对比

2. 撤销

  - git reset HEAD<file.name>

  - git checkout -- <file.name>

  - git commit --amend

猜你喜欢

转载自www.cnblogs.com/wssjzw/p/9080455.html