dotfiles/gitconfig
2017-05-08 14:04:27 -04:00

45 lines
2.0 KiB
Plaintext

[core]
excludesfile = ~/.gitignore_global
[user]
email = tyrelsouza@gmail.com
name = Tyrel Souza
signingkey = 8A2DDEE2
[commit]
gpgsign = true
[color]
ui = auto # covers diff = true, status = auto, branch = auto
interactive = auto
[push]
default = current
[fetch]
prune = true
[format]
pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d
[alias]
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
bc = !git branch --merged master | grep -v master | xargs git branch -d # delete all merged branches
d = diff --color-words # prettier diffs
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f" # Diff so fancy!
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit
ll = log --stat --abbrev-commit # Way more information on git log
lb = log --stat --no-merges origin/master..
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
p = push
pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15" # get the most 10 recent branches worked on
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
st = status # alias like `hg st`, because I like st, shorter is nice!
tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs
v=describe --tags --match 'v*' # show the current version tag
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[init]
templatedir = ~/.git_template