Skip to content

Instantly share code, notes, and snippets.

@vjandrea
Last active March 17, 2025 13:47
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.last "log --oneline -1"
git config --global alias.s "status -s -b"
git config --global alias.a "add ."
git config --global rerere.enabled 1
git config --global core.pager 'less -FRX'
git config --global push.autoSetupRemote true
@vjandrea
Copy link
Author

vjandrea commented Dec 7, 2024

user.name=Andrea Bergamasco
[email protected]
merge.ff=only
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
alias.ll=log --oneline -15
alias.last=log --oneline -1
alias.s=status -s -b
alias.st=status -s -b
alias.b=branch -v
alias.bm=branch --merged
alias.a=add .
alias.master=checkout master
alias.main=checkout main
alias.dev=checkout dev
alias.fa=fetch --all
alias.bv=branch -v
init.defaultbranch=main
core.pager=less -FRX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment