dotfiles/gitconfig
Tyrel Souza 1bebebb4d2
wat
2021-03-30 11:19:06 -04:00

95 lines
3.8 KiB
Plaintext

[core]
excludesfile = /Users/tyrel/.gitignore_global
editor = vim
symlinks = false
pager = less -F -X
[user]
email = tyrelsouza@gmail.com
name = Tyrel Souza
signingkey = C30AEAC0
[commit]
gpgsign = true
template = /Users/tyrel/.stCommitMsg
[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]
comit = commit
ab = "diff --name-only origin/main"
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
bc = !git branch --merged main | grep -v main | xargs git branch -d # delete all merged branches
bcc = !git branch -vv | grep ': gone' | cut -d' ' -f1-3 | grep -v main | xargs git branch -D
d = diff --color-words # prettier diffs
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit
lf = "!git diff --name-only origin/main" # Show all file differing from origin/main
ll = log --stat --abbrev-commit # Way more information on git log
lp = log --stat -p --abbrev-commit # Way more information on git log
lb = log --stat --no-merges origin/main..
lfm = "!git diff --name-only origin/master" # Show all file differing from origin/main
lbm = log --stat --no-merges origin/master..
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
noop="!git commit --allow-empty -m 'no op'"
ob = "!$EDITOR $(git diff --name-only origin/main)" # Open all files in editor that differ between origin/main and staged/unstaged
amanda = "!git commit --amend --author='Amanda P McDermott <amanda@tidelift.com>'"
oscar = "!git commit --amend --author='Oscar Spencer <oscar@tidelift.com>'"
od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
p = push
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/main/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
# rd = !git diff $(git describe --tags --abbrev=0 --match v*)
# rl = !git log $(git describe --tags --abbrev=0 --match v*)..
# pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
# dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f" # Diff so fancy!
[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
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$REMOTE\"
[merge]
tool = meld
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args --auto-merge \"$LOCAL\" \"$BASE\" \"$REMOTE\" --output=\"$MERGED\"
[protocol "http"]
allow = never
[protocol "git"]
allow = never
[fetch]
fsckObjects = true
[transfer]
fsckObjects = true
[receive]
fsckObjects = true