Skip to content

Instantly share code, notes, and snippets.

@0x4C4A
Forked from anonymous/git-settings.sh
Last active April 18, 2017 05:14
Show Gist options
  • Save 0x4C4A/0515e8a46144f96567cd to your computer and use it in GitHub Desktop.
Save 0x4C4A/0515e8a46144f96567cd to your computer and use it in GitHub Desktop.
My preferred git settings
#!/bin/sh
# My favourite flavour of git lg
git config --global alias.lga "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) -%C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset) %C(bold green)(%ar)%C(reset)' --all --date-order"
git config --global alias.lg "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) -%C(bold yellow)%d%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset) %C(bold green)(%ar)%C(reset)' --date-order"
# Rebase by default for all new branches
git config branch.autosetuprebase always
# Remember login details
git config --global credential.helper "store"
# If results can be shown in one screen, the console doesn't become interactive (i.e. you have to press q to exit)
git config --global pager.log "less -rFX"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment