Skip to content

Instantly share code, notes, and snippets.

@netpoetica
Last active October 2, 2019 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netpoetica/6812888 to your computer and use it in GitHub Desktop.
Save netpoetica/6812888 to your computer and use it in GitHub Desktop.
.gitconfig - Be sure to change the information in the [user] section to your username! A lot of this came from all over the WWW, including from the maestro @iansheridan
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green
changed = yellow
untracked = red
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
l = log --pretty=oneline -n 20 --graph
lg = log -p
lol = log --graph --pretty=format:'%C(yellow)%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative
lola = log --graph --pretty=format:'%C(yellow)%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative --all
ls = ls-file
s = status -s
tags = tags -l
branches = branch -a
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
[user]
name = MY_USERNAME
email = MY_EMAIL_ADDRESS
[core]
excludesfile = ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment