git Configuration
By Smitty Weygant
- One minute read - 57 wordsSetup git for development & testing
Set the default branch to main instead of master:
git config --global init.defaultBranch main
Set global name and email:
git config \--global user.name "Your Name"
git config \--global user.email "you@your-domain.com"
Improved 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"
Now use:
git lg