[user] name = Anton Bobov email = anton@bobov.name signingkey = B4DCCEF7CE0E6AF3 [commit] gpgsign = true verbose = true [tag] gpgsign = true sort = version:refname [http] sslVerify = false [color "diff-highlight"] oldNormal = red bold oldHighlight = red bold reverse [color "diff"] meta = 11 frag = magenta bold commit = yellow bold old = red bold new = green bold whitespace = red reverse [diff] algorithm = histogram tool = vimdiff colorMoved = true submodule = log mnemonicprefix = true [delta] light = true syntax-theme = Solarized (light) navigate = true relative-paths = true file-decoration-style = ol ul hyperlinks = true [interactive] diffFilter = delta --color-only [grep] lineNumber = true [merge] conflictstyle = zdiff3 stat = true tool = vimdiff [core] pager = delta excludesfile = ~/.gitignore quotepath = false attributesfile = ~/.gitattributes [log] decorate = short mailmap = true date = iso-local [alias] # Add & Commit aa = add --all acm = !git add --all && git commit -m addnw = !sh -c 'git diff --unified=0 --ignore-all-space --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -' amend = commit --amend c = commit --verbose cdate = !git commit -m "$(date +%F)" ci = commit fix = commit --amend -C HEAD # Branching br = branch --sort=-committerdate branch-name = "!git rev-parse --abbrev-ref HEAD" clean-branches = !sh -c 'git branch --merged | grep -v '^*' | fzf -m | xargs -rp git branch -d' recent = "!git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:magenta)%(authorname)%(color:reset)|%(color:bold green)%(committerdate:relative)|%(color:red)%(objectname:short)%(color:reset)'|column -ts'|'" # Checkout co = checkout co-before = !sh -c 'git rev-list -1 --before="$@" HEAD | xargs -r git checkout' - f = !sh -c 'git branch | grep -F "feature/$1" | xargs -r -n 1 git co' - # Config & Status b = blame -w -C -C -C edit-exclude = "!f() { GIT_DIR=\"$(git rev-parse --git-dir 2>/dev/null)\"; $EDITOR \"$GIT_DIR/info/exclude\"; }; f" sha = rev-parse --short st = status whoami = config user.email # Diff dc = diff --find-copies-harder --cached ddiff = -c diff.external=difft diff di = diff --find-copies-harder diffstat = diff --stat -r dshow = -c diff.external=difft show --ext-diff # GUI Tools history-all = "!gitk --all $( git fsck | awk '/dangling commit/ {print $3}'; git log -g --pretty='format:%H')" k = !sh -c 'gitk $1' - ka = !sh -c 'gitk --all' - kb = !sh -c 'gitk --branches' - # Log & History dlog = -c diff.external=difft log -p --ext-diff l = lg -10 lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%aN>%Creset' --abbrev-commit --date=relative rl = reflog --date=relative wc = whatchanged -p --abbrev-commit --pretty=medium # Merging & GitLab Helpers fugitive = mergetool --tool fugitive try = merge --no-commit --no-ff # GitLab Helpers mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - mr-clean = "!git for-each-ref refs/heads/mr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" # Patch & Archive ar = !sh -c 'git archive --format=tar --prefix="$(basename "$PWD")-$1/" $1^{tree} | bzip2 >"$(basename "$PWD")-$1.tar.bz2"' - fp = format-patch --find-renames --find-copies # Rebase & Hooks pre-commit-last = !sh -c 'pre-commit run --color always --from-ref HEAD~ --to-ref HEAD' prebase = rebase -x 'chronic git pre-commit-last' ra = rebase --abort rc = rebase --continue ri = rebase --interactive rx = rebase --exec # Remote & Network publish = "!git push -u origin $(git branch-name)" pushf = push --force-with-lease # https://datagrok.org/git/git-serve/ quickserve="daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/" # Reset & Undo undo = reset --soft HEAD~ # Stash stash-all = stash save --include-untracked stashlist = stash list --date=short # Submodules update-submodules = submodule update --init --recursive upgrade-submodules = submodule update --init --remote # Tags desc = describe --tags lasttag = desc --abbrev=0 lt = lasttag [advice] statusHints = false detachedHead = false [branch] autosetupmerge = always autosetuprebase = local sort = -committerdate [rebase] instructionFormat = %s [%aN] {%ar} stat = true autoStash = true updateRefs = true autoSquash = true [rerere] autoUpdate = true enabled = true [status] submoduleSummary = true [help] autocorrect = 10 [remote-hg] hg-git-compat = true [filter "tabs"] ;clean = unexpand --tabs=4 --first-only [gui] tabsize = 2 gcwarning = false [pull] rebase = true [push] followTags = true gpgSign = if-asked autoSetupRemote = true [guitool "meld"] cmd = meld $FILENAME noconsole = yes needsfile = yes [guitool "gvim"] cmd = gvim $FILENAME noconsole = yes needsfile = yes [include] path = ~/.gitconfig.local [filter "lfs"] required = true clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process [mergetool "fugitive"] cmd = vim -c \"Gdiff\" \"$MERGED\" [am] threeWay = true [fetch] prune = true writeCommitGraph = true all = true [submodule] fetchJobs = 0 [column] ui = auto # Allow pushing changes when working with a "read-only" remote from GitHub. [url "git@github.com:"] pushInsteadOf = https://github.com/ pushInsteadOf = git://github.com/