[core] pager = less -FX autocrlf = input excludesfile = ~/.gitignore hooksPath = ~/.config/git-hooks [user] name = {{name}} [includeIf "gitdir:~/work/"] path = ~/.config/gitconfig.work [includeIf "gitdir:~/src/"] path = ~/.config/gitconfig.personal [color] branch = auto status = auto diff = auto ui = auto wtf = true [pack] threads = 2 [alias] l = log co = checkout s = status b = branch re = rebase a = add f = fetch r = reset p = push fa = fetch --all c = commit age = !git-age $0 pulln = !git-pulln $0 d = diff wtf = status publish = !legit publish \"$@\" track-remote = !git-trackremote $0 lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative pullr = pull --rebase dc = diff --cached root = rev-parse --show-toplevel pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr" pushfwl = push --force-with-lease pf = pushfwl fixup = commit --fixup autosquash = rebase -i --autosquash au = rebase -i --autosquash sup = !"up() { git branch --set-upstream-to=origin/${1:-$(git branch --show-current)} ${1:-$(git branch --show-current)}; }; up" p = pull move = branch $1 -f $2 gone = ! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D" list = ! "git log main.. --reverse --pretty=format:\"%s\" | awk '{print \"- [X] \"$0 }'" grl = log --decorate --graph --format='%C(yellow)%h%Creset %Cred%d%Creset %s %Cgreen%an%Creset (%C(cyan)%ar%Creset)' -p authors = !"authors() { git log --pretty='format:%an <%ae>' | sort | uniq; }; authors" # Difftastic aliases, so `git dlog -p` is `git log -p` # with difftastic and likewise for the other subcommands. dlog = -c diff.external=difft log --ext-diff dshow = -c diff.external=difft show --ext-diff ddiff = -c diff.external=difft diff # `git log` with patches shown with difftastic. dl = -c diff.external=difft log -p --ext-diff # Show the most recent commit with difftastic. ds = -c diff.external=difft show --ext-diff # `git diff` with difftastic. dt = -c diff.external=difft diff [difftool "difftastic"] # See `man git-difftool` for a description of MERGED, LOCAL and REMOTE. cmd = difft "$MERGED" "$LOCAL" "abcdef1" "100644" "$REMOTE" "abcdef2" "100644" [difftool] # Run the difftool immediately, don't ask 'are you sure' each time. prompt = false [pager] # Use a pager if the difftool output is larger than one screenful, # consistent with the behaviour of `git diff`. difftool = true [diff] # Set difftastic as the default difftool, so we don't need to specify # `-t difftastic` every time. tool = difftastic [push] default = current autoSetupRemote = true useForceIfIncludes = true [branch] autoSetupRebase = always sort = -committerdate [fetch] prune = true pruneTags = true all = true [tag] sort = version:refname [tar "tar.xz"] command = xz -c [diff] algorithm = histogram colorMoved = plain mnemonicPrefix = true renames = true conflictstyle = zdiff3 [status] submoduleSummary = true [pull] rebase = true [init] defaultBranch = main [rerere] enabled = true autoupdate = true [column] ui = auto [commit] verbose = true gpgsign = true [rebase] autoSquash = true autoStash = true [credential] helper = store [gpg] format = ssh [gpg "ssh"] allowedSignersFile = ~/.config/git-allowed-signers