Git

Basic configuration

# -*- indent-tabs-mode: t; -*-
[user]
        email = [email protected]
        name = Lucien Cartier-Tilet
        signingkey = BD7789E705CB8DCA
[core]
        editor = emacsclient -c -a emacs
        whitespace = fix,-indent-with-non-tab,trailing-space
        excludesfile = /home/phundrak/.gitignore_global
[pull]
        rebase = true
[init]
        defaultBranch = main
[color]
        ui = auto
[web]
        browser = firefox

Aliases

abbreviationequivalent
aadd --all
aca!git add --all && git commit --amend
acan!git add --all && git commit --amend --no-edit
abbreviationequivalent
bbranch
bdbranch -d
bddbranch -D
abbreviationequivalent
ccommit -S
cacommit -Sa
cancommit -Sa --no-edit
cmcommit -Sm
camcommit -Sam
abbreviationequivalent
cocheckout
cobcheckout -b
codcheckout develop
abbreviationequivalent
clclone
cl1clone --depth 1
abbreviationequivalent
ffetch
fpfetch --prune
abbreviationequivalent
pspush
psfpush --force-with-lease
psopush origin
psfopush --force-with-lease origin
pushall!git remote \vert{} xargs -L1 git push
psl!git remote \vert{} xargs -L1 git push
pullall!git remote \vert{} xargs -L1 git pull
pll!git remote \vert{} xargs -L1 git pull
abbreviationequivalent
plpull
pbpull --rebase
abbreviationequivalent
rrebase
rarebase --abort
rcrebase --continue
rdrebase develop
rirebase -i
abbreviationequivalent
rmfrm -f
rmdrm -r
rmdfrm -rf
abbreviationequivalent
smsubmodule
smssubmodule status
smasubmodule add
smusubmodule update
smuisubmodule update --init
smuirsubmodule update --init --recursive
abbreviationequivalent
ststash
stcstash clear
stpstash pop
stwstash show
abbreviationequivalent
ureset --
unstagereset --
abbreviationequivalent
ddiff -w
llog --oneline --graph --decorate
sstatus
stageddiff --cached
upstream!git push -u origin HEAD
a = add --all
aca = !git add --all && git commit --amend
acan = !git add --all && git commit --amend --no-edit
[alias]
        a = add --all
        aca = !git add --all && git commit --amend
        acan = !git add --all && git commit --amend --no-edit
        b = branch
        bd = branch -d
        bdd = branch -D
        c = commit -S
        ca = commit -Sa
        can = commit -Sa --no-edit
        cm = commit -Sm
        cam = commit -Sam
        co = checkout
        cob = checkout -b
        cod = checkout develop
        cl = clone
        cl1 = clone --depth 1
        f = fetch
        fp = fetch --prune
        ps = push
        psf = push --force-with-lease
        pso = push origin
        psfo = push --force-with-lease origin
        pushall = !git remote | xargs -L1 git push
        psl = !git remote | xargs -L1 git push
        pullall = !git remote | xargs -L1 git pull
        pll = !git remote | xargs -L1 git pull
        pl = pull
        pb = pull --rebase
        r = rebase
        ra = rebase --abort
        rc = rebase --continue
        rd = rebase develop
        ri = rebase -i
        rmf = rm -f
        rmd = rm -r
        rmdf = rm -rf
        sm = submodule
        sms = submodule status
        sma = submodule add
        smu = submodule update
        smui = submodule update --init
        smuir = submodule update --init --recursive
        st = stash
        stc = stash clear
        stp = stash pop
        stw = stash show
        u = reset --
        unstage = reset --
        d = diff -w
        l = log --oneline --graph --decorate
        s = status
        staged = diff --cached
        upstream = !git push -u origin HEAD

Tools

Sendemail

[sendemail]
        smtpserver = mail.phundrak.com
        smtpuser = [email protected]
        smtpencryption = tls
        smtpserverport = 587
[credentials "smtp://[email protected]@mail.phundrak.com:587"]
        helper = "secret-tool lookup password email_lucien-phundrak-com"

Magit

[magithub]
        online = true
[magithub "status"]
        includeStatusHeader = true
        includePullRequestsSection = true
        includeIssuesSection = true

GPG

[gpg]
        program = gpg2
[commit]
        gpgsign = true

Merge

[merge]
        tool = ediff
[mergetool.ediff]
        cmd = emacs --eval \" (progn (defun ediff-write-merge-buffer () (let ((file ediff-merge-store-file)) (set-buffer ediff-buffer-C) (write-region (point-min) (point-max) file) (message \\\"Merge buffer saved in: %s\\\" file) (set-buffer-modified-p nil) (sit-for 1))) (setq ediff-quit-hook 'kill-emacs ediff-quit-merge-hook 'ediff-write-merge-buffer) (ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\"))\"

Pager

[pager]
        diff = delta
        log = delta
        reflog = delta
        show = delta

Delta

[delta]
        features = side-by-side line-numbers decorations
        whitespace-error-style = 22 reverse

[delta "decorations"]
        commit-decoration-style = bold yellow box ul
        file-style = bold yellow ul
        file-decoration-style = none

[interactive]
        diffFilter = delta --color-only

Git forges

[github]
        user = phundrak
[url "https://[email protected]"]
        insteadOf = https://github.com

[url "https://[email protected]"]
        insteadOf = https://labs.phundrak.com

LFS

[filter "lfs"]
        required = true
        clean = git-lfs clean -- %f
        smudge = git-lfs smudge -- %f
        process = git-lfs filter-process