Skip to content

Instantly share code, notes, and snippets.

@annacruz
Last active July 29, 2021 08:57
Show Gist options
  • Save annacruz/06cdd2e8e68b3da3ac188e54e4e4c542 to your computer and use it in GitHub Desktop.
Save annacruz/06cdd2e8e68b3da3ac188e54e4e4c542 to your computer and use it in GitHub Desktop.
Personal gitconfig
[user]
name = Anna Cruz
email = anna.cruz@gmail.com
[core]
editor = vim
[push]
default = current
[pull]
default = current
[color]
ui = true
[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]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lb = log master.. --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
reb = "!r() { git rebase -i HEAD~$1; }; r"
pf = push --force-with-lease
amend = commit --amend --no-edit
upstream = "!u() { git remote add upstream $1; }; u"
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
wip = "!git add --all; git ci -m WIP"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment