List Jira ticket ids from Git log
Prerequisite: Always use Jira ticket id in git commit messages.
-
Command:
git log <start commit hash>..<end commit hash> | grep -Eo '([A-Z]{3,}-)([0-9]+)' | uniq
-
Function (add to, e.g. ~/.bash_profile):
# Definition function git-jira-ids() { git log $1 | grep -Eo '([A-Z]{3,}-)([0-9]+)' | uniq } # Usage git-jira-ids <start commit hash>..<end commit hash>
Output: List of unqiue Jira ticket ids committed between "start commit hash" and "end commit hash"
-
Note: You can use tag and branch names instead of commit hash as well
git log --help
Written by Roman Stets
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#