Last active
June 14, 2023 08:28
-
-
Save wteuber/983ec0fdf94a45b6d19b6c914b852a78 to your computer and use it in GitHub Desktop.
Git checkout branch from previous commit message
This file contains 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
git checkout -b `git log -1 --pretty=%s | ruby -e "puts gets.downcase.gsub(/[^a-zA-Z0-9]+/, ' ').strip.tr(' ','_')"` |
This file contains 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
git checkout -b `git log -1 --pretty=%s | tr -sc '[:alnum:]' ' ' | tr '[:upper:]' '[:lower:]' | xargs | tr ' ' '-'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment