How-To¶
How to select “columnly”¶
How to rename¶
How to diff¶
With command git diff
Execute
git diff <SHA1 ID of the commit you want to diff with>With command git reset
Execute
git reset <SHA1 ID of the commit you want to diff with>Do not forget to reset back with
git reset ORIG_HEAD
How to revert partially¶
How to get a simple history¶
Execute
gitk --all &Click item View and then click item Edit view… or Press F4 directly.
Click item Simple history and then click button ok.
Sure, the above steps can be replaced with the following command:
gitk --all --simplify-by-decoration &
How to sync¶
Fetch and prune
git fetch --all git remote prune originCheckout
git checkout <the branch you want to synchronize>Three different situations may happen
If you want the remote only, execute
git reset --hard origin/<the branch you want to synchronize>If you want the “local” only, execute
git push -f [origin <the branch you want to synchronize>]If you want both of them, execute
git pull --rebaseor
git rebase origin/<the branch you want to synchronize>Then fix conflicts with
<edit> git add git rebase --continueor
git rebase --skipFinally, push it with
git push [origin <the branch you want to synchronize>]
How to make a “shortcut”¶
To Be Added