- Git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

- Git last branch
git config --global alias.lb '!git branch --sort=-committerdate --format="%(HEAD)%(color:yellow)%(re
fname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)" --color=always | co
lumn -t -s "|"'

- Rename all commits Author in a branch
NEW_NAME="New Author Name"
NEW_EMAIL="newauthor@example.com"
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
' -- --all
- Avoid use
--set-upstream
to git push of new branches

git config --global push.default current
git config --global push.autoSetupRemote true