Created
November 7, 2025 17:25
-
-
Save 1oglop1/021aefc33fba7d6dcca91b0dfb87d755 to your computer and use it in GitHub Desktop.
Git++
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 characters
| function gitpp() { | |
| # makes a commit with a number increased from the last commit message | |
| # eg: hello -> hello 2 -> hello 3 | |
| git commit -am "$(git --no-pager show -s --format=%s | awk 'BEGIN{FS=OFS=" "} {if($NF ~ /^[0-9]+$/) $NF++; else $NF=$NF" 2"}1')" && git push | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment