/
/
/
1[advice]
2 skippedCherryPicks = false
3[alias]
4 # Fuzzy add modified files, optionally via patch
5 addm = "!git ls-files --deleted --modified --other --exclude-standard | fzf -0 -m --preview 'git diff --color=always {-1}' | xargs -r git add"
6 addmp = "!git ls-files --deleted --modified --exclude-standard | fzf -0 -m --preview 'git diff --color=always {-1}' | xargs -r -o git add -p"
7 # Add all changes to last commit
8 append = "commit --all --amend --no-edit"
9 # Fuzzy checkout a branch, showing most recent commit
10 cb = "!git branch --all | grep -v '^[*+]' | awk '{print $1}' | fzf -0 --preview 'git show --color=always {-1}' | sed 's/remotes\\/origin\\///g' | xargs -r git checkout"
11 # Fuzzy apply a stash
12 cs = "!git stash list | fzf -0 --preview 'git show --pretty=oneline --color=always --patch \"$(echo {} | cut -d: -f1)\"' | cut -d: -f1 | xargs -r git stash pop"
13 # Fuzzy (force) delete a branch, showing most recent commit
14 db = "!git branch | grep -v '^[*+]' | awk '{print $1}' | fzf -0 --multi --preview 'git show --color=always {-1}' | xargs -r git branch --delete"
15 Db = "!git branch | grep -v '^[*+]' | awk '{print $1}' | fzf -0 --multi --preview 'git show --color=always {-1}' | xargs -r git branch --delete --force"
16 # Delete merged branches
17 dm = "!git fetch && git branch --merged | grep -v '^[*+]' | xargs -r git branch --delete --force"
18 # Fuzzy delete a stash
19 ds = "!git stash list | fzf -0 --preview 'git show --pretty=oneline --color=always --patch \"$(echo {} | cut -d: -f1)\"' | cut -d: -f1 | xargs -r git stash drop"
20 # Select modified files to edit
21 edit = "!git ls-files --modified --other --exclude-standard | sort -u | fzf -0 --multi --preview 'git diff --color {}' | xargs -r $EDITOR -p"
22 # Create a fixup commit to the selected commit
23 fixup = "!git log --oneline --no-decorate --no-merges | fzf -0 --preview 'git show --color=always --format=oneline {1}' | awk '{print $1}' | xargs -r git commit --fixup"
24 # Fetch and rebase
25 frb = "!git fetch --prune && git rebase --autostash \"$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')\""
26 # checkout origin/main
27 main = "checkout origin/main"
28 # Fuzzy reset staged files
29 resetm = "!git diff --name-only --cached | fzf -0 -m --preview 'git diff --cached --color=always {-1}' | xargs -r git reset"
30 # Show today's commits
31 today = "!git log --after=yesterday --author=\"$(git config user.name)\" --oneline --no-decorate --no-merges"
32 # Undo last commit, but keeping changes
33 undo = "reset --soft HEAD^"
34 # Show yesterday's commits
35 yesterday = "!git log --after=\"2 days ago\" --before=yesterday --author=\"$(git config user.name)\" --oneline --no-decorate --no-merges"
36 # more useful log
37 dog = "!git log --all --decorate --oneline --graph"
38[commit]
39 verbose = true
40[core]
41 pager = "diff-so-fancy | less --tabs=2 -RFX"
42 whitespace = space-before-tab,tab-in-indent,blank-at-eof,trailing-space,tabwidth=2
43[diff]
44 algorithm = minimal
45 tool = difftastic
46[difftool]
47 prompt = false
48[difftool "difftastic"]
49 cmd = difft "$LOCAL" "$REMOTE"
50[fetch]
51 prune = true
52[help]
53 autocorrect = 1
54[init]
55 defaultBranch = main
56[interactive]
57 diffFilter = "diff-so-fancy --patch"
58[merge]
59 autostash = true
60 conflictStyle = diff3
61 prompt = false
62 tool = nvim
63[mergetool "nvim"]
64 cmd = "nvim -d $MERGED $LOCAL $REMOTE"
65[pager]
66 difftool = true
67[pull]
68 rebase = true
69[push]
70 default = current
71 # Automatically set upstream when pushing (basically `-u` by default)
72 autoSetupRemote = true
73[rebase]
74 autosquash = 1
75[status]
76 # Show files within an untracked directory
77 showUntrackedFiles = all
78[include]
79 # Local modifications / auth
80 path = ~/.gitconfig.local
81[filter "lfs"]
82 clean = git-lfs clean -- %f
83 smudge = git-lfs smudge -- %f
84 process = git-lfs filter-process
85 required = true
86