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