Skip to content

Instantly share code, notes, and snippets.

@netpoetica netpoetica/.gitconfig
Last active Oct 2, 2019

Embed
What would you like to do?
.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
You can’t perform that action at this time.