diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-16 01:34:16 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-16 03:18:44 -0500 |
commit | e42c989d6def401dd893a73cef5d5deac8b42778 (patch) | |
tree | a85a03c0c2c9861729ff182d471ddfb25a09ec33 /config/git | |
parent | c08a8241a1844216bd76ecfe6bb7d20a8edaf00a (diff) | |
download | conf-e42c989d6def401dd893a73cef5d5deac8b42778.tar.gz conf-e42c989d6def401dd893a73cef5d5deac8b42778.zip |
prefer xdg basedir specification directories
Diffstat (limited to 'config/git')
-rw-r--r-- | config/git/config | 73 | ||||
-rw-r--r-- | config/git/ignore | 9 |
2 files changed, 82 insertions, 0 deletions
diff --git a/config/git/config b/config/git/config new file mode 100644 index 0000000..3a67355 --- /dev/null +++ b/config/git/config @@ -0,0 +1,73 @@ +[user] + email = doy@tozt.net + name = Jesse Luehrs +[alias] + a = !git amend + aliases = !git config --get-regexp 'alias.*' | perl -nle'/^alias\\.([^ ]*) (.*)/ && printf \"%-15s = %s\\n\", $1, $2' + alias = "!f() { local name=$1; shift; git config --global alias.$name \"$*\"; }; f" + amend = !git add -p && git commit --amend + bd = "!f() { git choose-branch | head -n1 | xargs --no-run-if-empty git branch -D; }; f" + bda = "!f() { git branch --merged master --format='%(refname:short)' | grep -v '^master$' | xargs -r git branch -d; }; f" + blame-stats = !~/.bin/git/git-blame-stats + br = for-each-ref --sort=committerdate refs/heads/ --format='%(align:30,left)%(HEAD) %(refname:short)%(end) %(color:magenta)(%(committerdate:relative))' + choose-branch = "!f() { git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)' | fzf --height 40% --no-sort --preview='git show {} -q --format=medium'; }; f" + c = "!f() { git choose-branch | head -n1 | xargs --no-run-if-empty git co; }; f" + cc = cherry-pick + co = checkout + diff-branch = "!f() { local branch=${1:-HEAD}; git diff $(git merge-base master $branch) $branch; }; f" + ff = merge --ff-only + file-size = !~/.bin/git/git-file-size + fixup = "!f() { git record --fixup \"$@\"; }; f" + gc-aggressive = "!f() { git repack -Abd --window=250 --depth=250 --window-memory=1g && git prune --expire \"1 day ago\" && rm -f .git/gc.log && git gc; }; f" + imerge = !~/.bin/git/git-imerge + info = remote show -n origin + lg = log --graph --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %C(bold blue)%aN%Creset %C(magenta)(%ar)%Creset%n%s%n' --abbrev-commit --date=relative --stat=72 + m = "!f() { git co master && git pull && EDITOR=true git merge --no-ff \"$@\" && git bda; }; f" + prune-all = !git remote | xargs -n 1 git remote prune + pushall = "!f() { for repo in origin github; do git push $repo \"$@\"; done; }; f" + record = !git add -p && git commit --verbose + refix = "!f() { env EDITOR=true git rebase -i \"$@\"; }; f" + re = rebase -i @{u} + r = !git record + ri = rebase -i + rv = checkout -p + stashed = stash list --pretty=format:'%<(10)%gd: %Cred%h%Creset %Cgreen(%ar)%Creset%n %s' + st = status -sb + track = "!f() { local name=$(git name-rev --name-only @); git branch --set-upstream-to=origin/$name $name; }; f" +[github] + user = doy +[color] + ui = auto +[core] + excludesfile = ~/.config/git/ignore +[push] + default = current +[branch] + autosetuprebase = always +[merge] + conflictstyle = diff3 +[rebase] + autosquash = true + autostash = true +[help] + autocorrect = 5 +[diff] + mnemonicprefix = true +[advice] + pushUpdateRejected = false + statusHints = false + commitBeforeMerge = false + resolveConflict = false + detachedHead = false +[rerere] + enabled = true +[pager] + log = diff-highlight | less + show = diff-highlight | less + diff = diff-highlight | less +[fetch] + prune = true +[include] + path = config.private + +; vim:ft=gitconfig: diff --git a/config/git/ignore b/config/git/ignore new file mode 100644 index 0000000..4491917 --- /dev/null +++ b/config/git/ignore @@ -0,0 +1,9 @@ +# ignore vim swap files +.*.sw? +# openoffice lock files +.~lock.* +# prove state files +.prove +# ctags files +tags +tags-ja |