Created
April 27, 2015 15:13
-
-
Save amitpdev/4c7ce1738f25ace2167f to your computer and use it in GitHub Desktop.
Git release notes
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
#!/usr/bin/env bash | |
relnotes() { | |
local from_ref=$1 | |
if [ "$#" -eq 2 ]; then | |
local to_ref=$2 | |
elif [ "$#" -eq 1 ]; then | |
local to_ref="HEAD" | |
else | |
echo "Usage: relnotes <from-ref> [<to-ref>]" | |
return 1 | |
fi | |
git log $from_ref..$to_ref --no-merges --pretty=format:"%s" |grep -vi bump | awk '{print "- ",$0}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save it in a git-functions.sh file and source it in your bashrc or bash_profile like so:
source $HOME/git-functions.sh