[user] name = Azat Khuzhin email = a3at.mail@gmail.com [init] defaultBranch = main [core] safecrlf = true # This is not for dot_files repository. # Because it may contain different _generated_ configs, # and I don't think that it is a good idea to change indent in all configs. # # This is for repositories with source codes. whitespace = blank-at-eol,-blank-at-eof,tab-in-indent,tabwidth=4 [diff] # checking for modifications is too slow for repos with a lot of submodules ignoreSubmodules = dirty [sequence] # https://github.com/MitMaro/git-interactive-rebase-tool editor = interactive-rebase-tool [add.interactive] useBuiltin = false # required for git 2.37.0 [log] mailmap = true [sendemail] smtpserver = /usr/bin/msmtp [tag] gpgSign = true [push] default = upstream gpgSign = if-asked [pull] ff = only [fetch] parallel = 100 [submodule] fetchJobs = 100 [color] branch = auto diff = auto grep = auto interactive = auto showbranch = auto status = auto ui = auto [color "branch"] current = green local = yellow remote = red [color "diff"] meta = yellow [color "grep"] match = green [color "status"] changed = yellow [merge] log = 1000 conflictstyle = diff3 [tag] sort = -v:refname [branch] sort = -authordate [alias] di = diff ci = commit cs = commit -S cis = commit --signoff amend = commit --amend amn = commit --amend --no-edit pi = cherry-pick br = branch mt = mergetool co = checkout ann = blame st = status patch = add --patch prev = checkout HEAD^ hprev = reset --hard HEAD^ slog = log --show-signature fixes = log --format=fixes -1 # from http://heipei.net/linux/files/configs/gitconfig llog = log --date=short --format=\"%C(94)--------------------------------------------------------------------------------%n%C(24)%h %C(124)%ad %C(34)%an %C(22)<%ae>%C(130)%d%n%C(178)%s%+b\" oneline = log --oneline # Ahead changes = !sh -c 'git log --oneline `git rev-parse --symbolic-full-name --abbrev-ref @{u}`...${u}' # Or just use git-status aheadbegind = !sh -c 'curr_branch=$(git rev-parse --abbrev-ref HEAD) && curr_remote=$(git config branch.$curr_branch.remote) && curr_merge_branch=$(git config branch.$curr_branch.merge | cut -d / -f 3) && git rev-list --left-right --count $curr_branch...$curr_remote/$curr_merge_branch | tr -s \\\\t \\|' # see which patches are different between branches branchonly = !sh -c 'git cherry HEAD ${1} | tr -d + | xargs -I{} git show {}' - currentonly = !sh -c 'git cherry ${1} HEAD | tr -d + | xargs -I{} git show {}' - mr-diff = !sh -c \"git di $(git merge-base ${1} me/${1}) me/${1} ${2:-master}\" # Debian-like changelog deb-changelog = !sh -c 'git --no-pager log --format=%ai\\ %aN\\ %n%n%x09*\\ %s%d%n' staged = diff --cached # sha1 of the current branch's HEAD sha1 = !sh -c 'git rev-parse ${1-`echo HEAD`}' - # shows a 7 character abbreviation of a reference, defaulting to HEAD abbrev = !sh -c 'git rev-parse --short ${1-`echo HEAD`}' - amk = am --keep-non-patch ams = am -s amks = am -s --keep-non-patch fp = format-patch purr = pull --rebase puff = pull --ff-only muff = merge --ff-only munn = merge --no-ff ready = rebase -i @{u} ri = rebase --interactive rc = rebase --continue ra = rebase --abort sp = stash pop ss = stash tarball = !sh -c 'git archive --format tar.gz --prefix `basename $PWD`-`git abbrev`/ HEAD > `basename $PWD`-`git abbrev`.tgz' mlog = !sh -c \"git log $(git merge-base --octopus $(git log -1 --merges --pretty=format:%P ${1-`echo HEAD`}))..$(git log -1 --merges --pretty=format:%H ${1-`echo HEAD`}) --boundary --graph --pretty=oneline --abbrev-commit\" # http://stackoverflow.com/a/30998048/328260 find-merge = "!sh -c 'if [ "$0" != "sh" ]; then commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2; else echo No commit passed; fi'" show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n "$merge" ] && git show $merge'" [pretty] fixes = Fixes: %h (\"%s\") # libevent changelog le = " o %s (%h %aN)" [apply] whitespace = warn # insteadOf/pushInsteadOf [url "git://anongit.kde.org/"] insteadOf = kde: [url "git@git.kde.org:"] pushInsteadOf = kde: [url "git@github.com:"] insteadOf = github: [url "git://git.code.sf.net/p/"] insteadOf = sf: [url "https://anonscm.debian.org/git/collab-maint/"] insteadOf = deb: [url "ssh://git.debian.org/git/collab-maint/"] pushInsteadOf = deb: [url "https://anonscm.debian.org/users/"] insteadOf = udeb: [url "ssh://git.debian.org/srv/home/users/"] pushInsteadOf = udeb: [url "git://anongit.freedesktop.org/"] insteadOf = freedesktop: [url "https://aur.archlinux.org/"] insteadOf = aur: [url "ssh://aur@aur.archlinux.org/"] pushInsteadOf = aur: [url "git@git.sr.ht:~azat/"] insteadOf = me.sr: [url "git@git.sr.ht:~azat/"] pushInsteadOf = me.sr: