Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wteuber/983ec0fdf94a45b6d19b6c914b852a78 to your computer and use it in GitHub Desktop.
Save wteuber/983ec0fdf94a45b6d19b6c914b852a78 to your computer and use it in GitHub Desktop.
Git checkout branch from previous commit message
git checkout -b `git log -1 --pretty=%s | ruby -e "puts gets.downcase.gsub(/[^a-zA-Z0-9]+/, ' ').strip.tr(' ','_')"`
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