Skip to content

Instantly share code, notes, and snippets.

@vjandrea
Last active September 11, 2025 12:50
Show Gist options
  • Save vjandrea/f2d4d6f1fddd9f24952e3cfe6258f083 to your computer and use it in GitHub Desktop.
Save vjandrea/f2d4d6f1fddd9f24952e3cfe6258f083 to your computer and use it in GitHub Desktop.
git-config.sh
#!/bin/sh
git config --global init.defaultBranch main
git config --global merge.ff only
git config --global alias.l "log --pretty=format:'%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(7,trunc)%aN%C(auto,reset)%s%C(auto,red)% %C(auto)%gD %D' --date=relative --decorate -20"
git config --global alias.ll "log --oneline -15"
git config --global alias.last "log --oneline -1"
git config --global alias.s "status -s -b"
git config --global alias.st "status -s -b"
git config --global alias.b "branch -v"
git config --global alias.bm "branch --merged"
git config --global alias.a "add ."
git config --global alias.master "checkout master"
git config --global alias.main "checkout main"
git config --global alias.dev "checkout dev"
git config --global alias.fa "fetch --all"
git config --global alias.bv "branch -v"
git config --global rerere.enabled 1
git config --global core.pager 'less -FRX'
git config --global push.autoSetupRemote true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment