diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-07-13 12:47:10 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-07-13 12:47:10 -0500 |
commit | 8e75c580522c22f126d52a40a56c43b3e5b802f1 (patch) | |
tree | 1eca9b2c1a378afe5973daf1f5ca4db545f9b49e | |
parent | 3133aac738ddfd2e9fcee5ff917c7e2830cac34f (diff) |
feat: added git squash alias
-rw-r--r-- | gitconfig | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -52,6 +52,9 @@ pop = git reset HEAD~ # rename branch brn = "!f() { git branch -m \"$(git rev-parse --abbrev-ref HEAD)\" $1; git fetch origin; git branch -u origin/$1 $1; git remote set-head origin -a; }; f" +# squash the last N commits, inclusivly +squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f" + # grep on filename f = "!git ls-files | grep -i" |