Skip to content

Instantly share code, notes, and snippets.

@amitpdev
Created April 27, 2015 15:13
Show Gist options
  • Save amitpdev/4c7ce1738f25ace2167f to your computer and use it in GitHub Desktop.
Save amitpdev/4c7ce1738f25ace2167f to your computer and use it in GitHub Desktop.
Git release notes
#!/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}'
}
@amitpdev
Copy link
Author

Save it in a git-functions.sh file and source it in your bashrc or bash_profile like so:
source $HOME/git-functions.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment