Skip to content

Instantly share code, notes, and snippets.

@nath1as
Last active November 9, 2021 16:34
Show Gist options
  • Save nath1as/d5fe27990ae2ed81e6f8e689ec4cfd3c to your computer and use it in GitHub Desktop.
Save nath1as/d5fe27990ae2ed81e6f8e689ec4cfd3c to your computer and use it in GitHub Desktop.
git config
#.gitcoinfg
[alias]
# Get jira ticket
ticket = "!f() { git rev-parse --abbrev-ref HEAD | grep -Eo '([A-Z]{3,}-)([0-9]+)' -m 1 ; }; f"
# Commit w/ message prefixed with JIRA ticket
cm = "!f() { TICKET=$(git ticket); git commit -m \"$TICKET $1\"; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment