Skip to content

Instantly share code, notes, and snippets.

@MaximeD
Created December 26, 2016 17:15
Show Gist options
  • Save MaximeD/656999c1e8eca040843011ddf27575f3 to your computer and use it in GitHub Desktop.
Save MaximeD/656999c1e8eca040843011ddf27575f3 to your computer and use it in GitHub Desktop.
#!/bin/sh
repo=$(echo $(git ls-remote --get-url) | sed 's/git@github.com:\(.\+\)\.git/\1/')
branch=$(git rev-parse --abbrev-ref HEAD)
echo "See or create pull request at:"
echo -e "\thttps://github.com/$repo/compare/$branch?expand=1"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment