- Checkout a single file from another branch
git checkout some-other-branch -- yarn.lock
- View the log without merge commits
git log --oneline --no-merges
-
Rewrite your last commit message
git commit -v --amend -
Get rid of all untracked changes
git clean -f -d -
Print out a cool visualization of your log
git log --pretty=oneline --graph --decorate --all -
Ask git for a changelog
git shortlog <commit>..HEAD -
View the log for a specific date range
git log --since='FEB 10 2016' --until='FEB 19 2016' -
List all git aliases
git config -l | grep alias | sed 's/^alias\.//g' -
Search for commits that include a keyword
git log -S"config. menu_items" -
Super secret list of git tutorials
git help -g
What Do you think? Add yours in replies.