有用的git命令

1. git log -p // 查看log的详细信息

2. git reset HEAD xxxx // 将文件从stage状态拉出来

3. git checkout -- xxxx // 将修改的文件全部撤销

4. git tag

5. git tag -a xxx -m 'dsfdsafdafdaf'

6. git show xxx

7. git tag -a v1.2 9fceb02 // 后期打标签

8. git tag -d v1.4-lw // 删除标签

9. git checkout -b xxxx

10. git branch -d xxx

11. git branch xxxx

12. git merge hotfix 

13.git stash clear :删除所有缓存的stash

原文地址:https://www.cnblogs.com/cjjjj/p/10419170.html