Skip to content

Instantly share code, notes, and snippets.

@newmen
Created May 13, 2024 16:03
Show Gist options
  • Save newmen/79f26604a2fb69ad862fe80f7fcbc03c to your computer and use it in GitHub Desktop.
Save newmen/79f26604a2fb69ad862fe80f7fcbc03c to your computer and use it in GitHub Desktop.
.gitconfig
[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
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = /Users/newmen/.gitignore
[branch]
autosetupmerge = true
[alias]
p = add --patch
pl = pull origin
ph = push origin
st = status
ci = commit
br = branch
co = checkout
df = diff
dc = diff --cached
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
hist = log --graph --pretty=format:\"%C(yellow)%h%Creset%C(cyan)%C(bold)%d%Creset %C(cyan)(%cr)%Creset %C(green)%ce%Creset %s\"
ls = ls-files
# Show files ignored by git:
ign = ls-files -o -i --exclude-standard
reauthor = !bash -c 'git rebase --onto $1 --exec \"git commit --amend --author=\\\"$2\\\"\" $1' --
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f "
[merge]
tool = meld
[push]
default = simple
[oh-my-zsh]
hide-status = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment