Skip to content

Instantly share code, notes, and snippets.

@AGhost-7
Last active May 26, 2016 04:05
Show Gist options
  • Save AGhost-7/47ac1fdb258b85e27d79723384ebe54d to your computer and use it in GitHub Desktop.
Save AGhost-7/47ac1fdb258b85e27d79723384ebe54d to your computer and use it in GitHub Desktop.
Print a diff of the commit logs *before* creating a release to generate the releases page in Jira
# The branch that the new branch hasn't been merged into
oldBranch="master"
# The branch with new commits
lastestBranch="develop"
git log $latestBranch ^$oldBranch --no-merges --pretty='format:%s' \
| grep -o -E '^(\[){0,1}([A-Za-z]+)[- ][0-9]+' \
| sed 's/\[//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment