Skip to content

Instantly share code, notes, and snippets.

@danlherman danlherman/bb-change-url
Last active Dec 9, 2015

What would you like to do?
script to create a url for showing the changes between the last two git tags for bitbucket
# This utility creates a bitbucket URL for showing the changes between the last two tags for the
# git repo you are currently in.
# To install this place this file in your /usr/local/bin folder and
# chmod +x the file so it has execution rights. Then run 'bb-change-url' from any git repo.
# Dan Herman
repo_name=`git remote show origin | grep "Fetch URL:" | sed "s#^.*/\(.*\).git#\1#"`
current_tag=`git tag | tail -n1`
previous_tag=`git tag | tail -n2 | head -n1`
echo $start_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.