Skip to content

Instantly share code, notes, and snippets.

@jerodsanto jerodsanto/bb.rb
Last active Aug 29, 2015

Embed
What would you like to do?
Quick & dirty script to open the current directory's git repo on BitBucket. Surely there's a better way
#!/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
You can’t perform that action at this time.