gitconfig (5516B)
1 ; vim: syntax=gitconfig 2 [include] 3 path = identity 4 ; this file isn't in the repo 5 ; sets user.name, user.email, and init.templatedir 6 7 [alias] 8 s = status 9 wt = worktree 10 v = "!nvim -c 'Git | only'" 11 co = checkout 12 cob = checkout -b 13 f = fetch --all 14 fapr = fetch --all --prune 15 b = branch 16 br = branch --remote 17 ba = branch --all 18 bv = branch -vv 19 20 lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --branches --remotes --tags --oneline --author-date-order 21 lgv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%w(130,10,10)%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all --author-date-order 22 llg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --oneline --author-date-order 23 llgv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%w(130,10,10)%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all --author-date-order 24 llgvv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%w(130,13,13)%C(white)%s%C(reset) %C(dim white)- %an <%ce> (comm. %cn <%ce>)%C(reset)%n''%w(64,18,18)%b' --all 25 today = lgv --since='midnight' 26 yesterday = lgv --since='yesterday midnight' --until='midnight' 27 this-week = lgv --since='last-monday' 28 past-week = lgv --since='1 weeks ago' 29 cbsr-sprint = lgv --since='last-tuesday' --until='this-tuesday' 30 adog = log --all --decorate --oneline --graph 31 dog = log --decorate --oneline --graph 32 33 authors = !git log --all --format='%cN <%cE>' | sort -u 34 35 a = add 36 ap = add -p 37 af = "!git ls-files -m -o --exclude-standard | fzf --print0 -m --reverse --height=20% | xargs -0 -t -o git add" 38 fa = af 39 fzf = "!git ls-files -mo --exclude-standard | fzf -m --reverse --height=20%" 40 41 c = commit 42 cm = commit -m 43 cam = commit -a -m 44 ca = commit -a 45 camende = commit --amend 46 camend = commit --amend --no-edit 47 cp = commit -p 48 49 rp = reset -p 50 51 ss = stash push 52 sp = stash pop 53 sa = stash apply 54 sd = stash drop 55 sl = stash list 56 57 blame = "blame -w -C -C -C" # ignore whitespace, look for code movement, in multiple commits, for all commits 58 diffs = "diff --staged" 59 diffw = "diff --word-diff" 60 changes = diff --summary --stat 61 changess = changes --staged 62 mergetest = merge --no-commit 63 testmerge = mergetest 64 mno = merge --no-ff 65 mff = merge --ff-only 66 delete-merged = "!git checkout master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d && git fetch --all --prune" 67 p = push 68 pushf = push --force-with-lease 69 pf = pull --ff-only 70 pff = pull --ff-only 71 fuckit = reset --hard HEAD 72 fuckitall = reset --hard origin/master 73 ssh = "!git remote get-url origin | sed -E 's|^https?://([^/]+)/(.+)|git@\\1:\\2|' | tr -d '\n'" 74 home = "!f(){ git remote get-url \"${1:-origin}\" | sed -E 's|^git@([^:]+):|https://\\1/|' | tr -d '\n'; }; f" 75 open = "!f(){ open $(git home \"$1\"); }; f" 76 dad = "!curl https://icanhazdadjoke.com/ && echo && git add" 77 reignore = "!git rm -r --cached .; git add ." 78 rebase = "rebase --committer-date-is-author-date" 79 rc = "rebase --continue" 80 ra = "rebase --abort" 81 mc = "merge --continue" 82 ma = "merge --abort" 83 lfs-refs = "!git fetch --all && git log -p --all -S" 84 chp = cherry-pick 85 chpn = cherry-pick --no-commit 86 87 la = "!git config -l | grep alias | cut -c 7-" 88 rv = remote -v 89 90 subget = submodule update --init 91 subdate = submodule update --remote 92 substatus = submodule status 93 subactive = "!git submodule status | grep -v '^-'" 94 subdel = "!f(){ set -x; git submodule deinit -f "$1"; rm -rf .git/modules/"$1"; git rm -f "$1"; set +x; }; f" 95 96 root = !git rev-parse --show-toplevel | tr -d '\n' 97 98 edit-changed = "!$EDITOR `git status --porcelain | sed -ne 's/^ M //p'`" 99 commit-at = "!f(){\ 100 if [ $# -eq 0 ]; then\ 101 echo \"Date format: YYYY-MM-DD HH:MM:SS\";\ 102 else\ 103 GIT_COMMITTER_DATE=\"$1\" GIT_AUTHOR_DATE=\"$1\" git commit;\ 104 fi; }; f" 105 106 df = !git --git-dir=$DOTFILES/.git --work-tree=$DOTFILES 107 108 [submodule] 109 recurse = 1 110 [merge] 111 tool = nvimdiff 112 conflictstyle = diff3 113 114 [mergetool "nvimdiff"] 115 cmd = nvim -d \"$LOCAL\" \"$MERGED\" \"$BASE\" \"$REMOTE\" -c \"wincmd w\" -c \"wincmd J\" 116 [diff] 117 algorithm = histogram 118 [core] 119 autocrlf = input 120 121 [filter "lfs"] 122 clean = git-lfs clean -- %f 123 smudge = git-lfs smudge -- %f 124 process = git-lfs filter-process 125 required = true 126 [init] 127 defaultBranch = master 128 [rerere] 129 # remember how I solved a merge conflict and reuse it 130 enabled = true 131 # automatically stage the reuse 132 autoUpdate = true 133 # Use ssh key to sign commits 134 [gpg] 135 format = ssh 136 [credential] 137 helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret 138 #helper = cache 139 [transfer] 140 fsckobjects = true 141 [fetch] 142 fsckobjects = true 143 [receive] 144 fsckobjects = true