[user] name = Jan Pokorný email = jpokorny@redhat.com [alias] ai = add -ip c = commit -s ci = "!git_ci() {\ git checkout-index --temp -- \"${@/#/$GIT_PREFIX}\"\ | xargs -I {} sh -c '_do() {\ mv \"$1\" \"${GIT_PREFIX}.checkout-$(basename \"$2\")\";\ }; _do {}';\ }; git_ci" co = checkout g = log --grep gg = log -p --grep cw = diff --color-words=[^[:space:],_]+ dh = diff HEAD ds = diff --staged rh = reset HEAD wd = diff --word-diff swd = show --word-diff su = "!git_su() {\ set -- $(git rev-list --left-right --count @{u}...HEAD);\ test $2 -eq 0 || git show -$2;\ test $1 -eq 0 || echo \"also $1 behind!\";\ }; git_su" pd = "!git_pd() {\ git diff --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pd" pwd = "!git_pwd() {\ git wd --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pwd" ps = "!git_ps() {\ git show --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_ps" pswd = "!git_pswd() {\ git swd --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pswd" # script to preserve colors; quoting is strange, but "just works" s = "!git_s() {\ script -qc \"git status \"$@\"\" /dev/null\ | grep -ve '^. [(]' -e '^..$'\ | awk '/^[\"-$] Untracked/{exit}{print $0}';\ }; git_s" sb = show-branch # git se @ .... se = "!git_se() {\ local subjpfx=\"PATCH\"; [[ $1 =~ ^@* ]] && [[ ${@:$#} =~ ^-[1-9]* ]]\ && subjpfx=\"${1#@}][${subjpfx}\" && shift && echo \"SUBJ prefix: [${subjpfx}]\";\ git send-email --subject-prefix=\"${subjpfx}\" \"$@\";\ }; git_se" wc = whatchanged pwc = "!git_pwc() {\ git wc --color \"$@\" | subwc | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pwc" # http://www.jukie.net/bart/blog/pimping-out-git-log lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ --abbrev-commit --date=relative ack = "!git_ack() {\ git ls-files 2>/dev/null\ | ${ACK:-ack} --files-from - \"$@\" 2>/dev/null\ || ${ACK:-ack} \"$@\";\ }; git_ack" [core] editor = vim [push] default = simple [column] status = auto [color] branch = auto diff = auto status = auto [color "branch"] current = yellow reverse local = yellow remote = green [color "diff"] meta = black reverse bold frag = magenta bold old = red bold new = green bold [color "status"] added = yellow changed = green untracked = cyan [http] sslCAInfo = /home/jpokorny/.pki/tls/certs/ca-bundle.crt # http://lukas.zapletalovi.com/2012/06/three-way-git-merging-and-meld.html # -> http://lukas.zapletalovi.com/2012/09/three-way-git-merging-with-meld.html [merge] tool = mymeld conflictstyle = diff3 [mergetool "mymeld"] cmd = meld --diff $BASE $LOCAL --diff $BASE $REMOTE --diff $LOCAL $BASE $REMOTE $MERGED [sendemail] smtpserver = smtp.corp.redhat.com [include] path = ~/.gitconfig-priv