Skip to content

Commit 59e0207

Browse files
committed
Add git squash-all alias
1 parent 56655ad commit 59e0207

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/git/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
rh = reset --hard HEAD
6969
ra = rebase --abort
7070
rc = rebase --continue
71+
squash-all = "!f() { git reset $(git commit-tree HEAD^{tree} -m \"${1:-Initial commit}\"); }; f"
7172
s = status
7273
show-ignored = !git clean -ndX | perl -pe 's/Would remove //'
7374
sshort = "!f() { git show --shortstat \"${1:-HEAD}\" | awk \"/files? changed/ { gsub(/,/, \\\"\\\", \\$4); gsub(/,/, \\\"\\\", \\$6); print \\\"\\033[32m+\\\" \\$4 \\\" \\033[31m-\\\" \\$6 \\\"\\033[0m\\\" }\"; }; f"

0 commit comments

Comments
 (0)