From 45dedcd36fcb6b5ef5dc8f7cab0df8f8ffe00fd5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 3 Dec 2020 13:16:32 +0100 Subject: git: add squash alias --- .config/git/config | 2 ++ 1 file changed, 2 insertions(+) (limited to '.config/git/config') diff --git a/.config/git/config b/.config/git/config index 31df5f8..1930540 100644 --- a/.config/git/config +++ b/.config/git/config @@ -21,6 +21,7 @@ [core] excludesfile = ~/.git/ignore + # Treat spaces before tabs and all kinds of trailing whitespace as an error # [default] trailing-space: looks for spaces at the end of a line # [default] space-before-tab: looks for spaces before tabs at the beginning of a line @@ -78,6 +79,7 @@ pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" total-lines = "! git ls-tree -r master --name-only | xargs -I {} git blame --line-porcelain {} | sed -n 's/^author //p' | sort | uniq -c | sort -rn" fixup = "!f() { git commit --fixup=${1}; }; f" + squash = "!f() { git commit --squash=${1}; }; f" rbi = rebase --autosquash -i rbi-pr = !bash -c 'git rebase --autosquash -i `git merge-base HEAD ${1:-origin/master}`' pushf = push --force-with-lease -- cgit 1.4.1