Last active
August 29, 2015 14:07
-
-
Save jerodsanto/46fa17b2abedba0678fa to your computer and use it in GitHub Desktop.
Quick & dirty script to open the current directory's git repo on BitBucket. Surely there's a better way
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 ruby | |
if remote = `git remote -v`.lines.find { |l| l.match /bitbucket/ } | |
remote.match /(bitbucket\.org\/.*?)\.git/ | |
system "open https://#{$1}" | |
else | |
puts "No BitBucket remote :(" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment