- git clone [url]
- git add [filename]
- git commit -m “Commit message”
- git diff [first branch] [second branch]
- git reset [file]
- git status
- git remote prune [remote name]
use git cherry pick
- git show [commit hash]
- git cherry-pick [commit hash] -n or git cherry-pick [from commit hash]^..[to commit hash] -n
- git status
- git commit -m “`git log –oneline -n1 [commit hash]`”
指定檔案還原
git log --oneline [filename]
git checkout [commit hash] [filename]