dotfiles/home/gitconfig

96 lines
3.9 KiB
Plaintext
Raw Permalink Normal View History

2015-09-15 17:15:20 +00:00
[core]
2023-01-17 23:39:14 +00:00
excludesfile = ~/.gitignore_global
editor = nvim
symlinks = false
pager = less -F -X
2016-04-05 19:25:30 +00:00
[user]
email = tyrelsouza@gmail.com
name = Tyrel Souza
2021-08-06 13:19:39 +00:00
signingkey = F3614B02ACBE438E
2016-04-07 17:43:34 +00:00
[commit]
2023-01-17 23:39:14 +00:00
gpgsign = true
2019-02-25 19:42:07 +00:00
template = /Users/tyrel/.stCommitMsg
2016-04-07 18:04:31 +00:00
[color]
2016-04-21 18:49:05 +00:00
ui = auto # covers diff = true, status = auto, branch = auto
interactive = auto
2016-04-05 19:25:30 +00:00
[push]
2023-01-17 23:39:14 +00:00
default = current
2017-04-24 14:45:50 +00:00
[fetch]
prune = true
2016-04-07 17:32:17 +00:00
[format]
2016-04-07 17:43:34 +00:00
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
2016-04-05 19:25:30 +00:00
[alias]
2021-08-06 13:19:39 +00:00
club = !club story $1 --git-branch
cleanslate = "!git reset $(git merge-base main $(git rev-parse --abbrev-ref HEAD))"
2019-02-25 19:42:07 +00:00
comit = commit
2021-02-11 16:25:39 +00:00
ab = "diff --name-only origin/main"
2017-05-08 18:04:27 +00:00
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
2021-02-11 16:25:39 +00:00
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
2017-05-08 18:04:27 +00:00
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
2021-02-11 16:25:39 +00:00
lf = "!git diff --name-only origin/main" # Show all file differing from origin/main
2017-05-08 18:04:27 +00:00
ll = log --stat --abbrev-commit # Way more information on git log
2021-02-11 16:25:39 +00:00
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..
2019-02-25 19:42:07 +00:00
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
2021-02-11 16:25:39 +00:00
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
2019-02-25 19:42:07 +00:00
od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
2016-04-21 18:49:05 +00:00
p = push
2021-02-11 16:25:39 +00:00
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
2019-02-25 19:42:07 +00:00
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
2023-02-25 04:47:15 +00:00
st = "!git log -n 1 && git status" # alias like `hg st`, because I like st, shorter is nice!
2017-05-08 18:04:27 +00:00
tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs
v=describe --tags --match 'v*' # show the current version tag
2019-02-25 19:42:07 +00:00
# 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!
2016-04-05 19:25:30 +00:00
[filter "lfs"]
2016-04-21 18:49:05 +00:00
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
2016-07-14 19:19:30 +00:00
[color "diff-highlight"]
2019-02-25 19:42:07 +00:00
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
2017-02-15 17:38:00 +00:00
[init]
2019-02-25 19:42:07 +00:00
templatedir = ~/.git_template
2023-06-24 16:13:26 +00:00
defaultBranch = main
2017-05-11 21:16:45 +00:00
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
2019-02-25 19:42:07 +00:00
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
2017-05-11 21:16:45 +00:00
trustExitCode = true
2019-02-25 19:42:07 +00:00
[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\"
2021-03-30 15:19:06 +00:00
[protocol "http"]
allow = never
[protocol "git"]
allow = never
[fetch]
fsckObjects = true
[transfer]
fsckObjects = true
[receive]
fsckObjects = true