diff options
| author | Robert Günzler <r@gnzler.io> | 2020-12-03 13:16:32 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-12-07 19:28:05 +0100 |
| commit | 45dedcd36fcb6b5ef5dc8f7cab0df8f8ffe00fd5 (patch) | |
| tree | c1f6dbafe52bdb17ede1d50bb8e84b8137a24b87 /.config | |
| parent | 791a75fc7bdbe450d70f547acd0b68c43172c0b4 (diff) | |
git: add squash alias
Diffstat (limited to '.config')
| -rw-r--r-- | .config/git/config | 2 |
1 files changed, 2 insertions, 0 deletions
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 |