Skip to content

Instantly share code, notes, and snippets.

@liluo
Created July 25, 2017 12:48
Show Gist options
  • Save liluo/736642c96df60e7a887954a2f9e3e04c to your computer and use it in GitHub Desktop.
Save liluo/736642c96df60e7a887954a2f9e3e04c to your computer and use it in GitHub Desktop.
function rc {
release_branch=`git branch | grep release/ | sort -r | head -n 1 | sed -e s/'* '// | awk '{print $1}'`
diff_branchs="master..$release_branch"
echo -e "\e[34;5;204mRelease branch: $release_branch, diff: $diff_branchs, commits: \e[0m"
text=`git log $diff_branchs --pretty=format:'- %s by @%an' --reverse | grep -v Merge | sort | uniq`
echo $text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment