From 49570c8dd03448240897b37b68567352b790f16f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 8 Oct 2023 12:09:20 -0400 Subject: convert to stow --- git/.config/git/config | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ git/.config/git/ignore | 10 +++++++ 2 files changed, 89 insertions(+) create mode 100644 git/.config/git/config create mode 100644 git/.config/git/ignore (limited to 'git') diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..b8092d8 --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,79 @@ +[user] + email = doy@tozt.net + name = Jesse Luehrs +[alias] + 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 = !~/.bin/git/git-amend + bda = "!f() { git branch --merged $(git default-branch) --format='%(refname:short)' | grep -v \"^$(git default-branch)$\" | 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))' + cc = cherry-pick + co = checkout + default-branch = !~/.bin/git/git-default-branch + diff-branch = "!f() { local branch=${1:-HEAD}; git diff $(git merge-base $(git default-branch) $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 + pr = !~/.bin/git/git-pr + prune-all = !git remote | xargs -n 1 git remote prune + record = !~/.bin/git/git-record + refix = "!f() { env EDITOR=true git rebase -i \"$@\"; }; f" + re = rebase -i @{u} + ri = rebase -i + root = !~/.bin/git/git-root + rv = checkout -p + stashed = stash list --pretty=format:'%<(10)%gd: %Cred%h%Creset %Cgreen(%ar)%Creset%n %s' + st = status -sb + start = "!f() { git commit --allow-empty -m 'initial commit' && git add . && git commit -m 'project skeleton'; }; f" + track = "!f() { local name=$(git name-rev --name-only --exclude='branchless/*' @); git branch --set-upstream-to=origin/$name $name; }; f" +[github] + user = doy +[color] + ui = auto +[core] + excludesfile = ~/.config/git/ignore + pager = delta + untrackedCache = true +[push] + default = current +[branch] + autosetuprebase = always +[merge] + conflictstyle = diff3 +[rebase] + autosquash = true + autostash = true +[help] + autocorrect = 5 +[diff] + mnemonicprefix = true + external = difft +[advice] + pushUpdateRejected = false + statusHints = false + commitBeforeMerge = false + resolveConflict = false + detachedHead = false +[rerere] + enabled = true +[fetch] + prune = true +[pull] + rebase = true +[include] + path = config.private +[interactive] + diffFilter = delta --color-only +[delta] + navigate = true +[init] + defaultBranch = main +[submodule] + recurse = true + +; vim:ft=gitconfig: diff --git a/git/.config/git/ignore b/git/.config/git/ignore new file mode 100644 index 0000000..336895e --- /dev/null +++ b/git/.config/git/ignore @@ -0,0 +1,10 @@ +# ignore vim swap files +.*.sw? +# openoffice lock files +.~lock.* +# prove state files +.prove +# ctags files +tags +tags-ja +.obsidian -- cgit v1.2.3-54-g00ecf