-
-
Save chadwhitacre/5d2ff5f46cd0bc981b3f3b76cf891b97 to your computer and use it in GitHub Desktop.
Revisions
-
chadwhitacre revised this gist
Feb 24, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,4 @@ N=${1:-2} msg="$(git log --format=%B -n 1 HEAD~$(( $N - 1 )))" git reset --soft HEAD~$N && git commit -nm "$msg" -
chadwhitacre revised this gist
Feb 23, 2021 . No changes.There are no files selected for viewing
-
chadwhitacre revised this gist
Feb 23, 2021 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,10 @@ #!/usr/bin/env zsh # # https://gist.github.com/chadwhitacre/5d2ff5f46cd0bc981b3f3b76cf891b97 # # Squash the N most recent git commits together (default: 2), using the oldest # one's commit message. N=${1:-2} msg="$(git log --format=%B -n 1 HEAD~$(( $N - 1 )))" git reset --soft HEAD~$N && git commit -m "$msg" -
chadwhitacre created this gist
Feb 23, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/usr/bin/env zsh set -euo pipefail n=${1:-2} msg="$(git log --format=%B -n 1 HEAD~$(( $n - 1 )))" git reset --soft HEAD~$n && git commit -m "$msg"