記錄git不怎么常用,但偶爾會很有用的操作
1, 撤銷本地上一次的commit
git reset HEAD~
2, 撤銷遠端的上一次push
git reset --hard <commit-hash>
git push -f origin master
3, merge另一個分支的某次commit
git cherry-pick $commit_hash
4, 查看某次commit的詳情
git show $commit_hash
5, 查看遠端分支
git remote -v