0.0
No commit activity in last 3 years
No release in over 3 years
open a git repo's web remote from your terminal, with 'git open'.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0

Runtime

>= 1.2
 Project Readme

open-remote

Gem Version Build Status MIT

open-remote - a simple git remote opening tool.

tested and works well for:

- github
- bitbucket
- heroku

if there are other git hosting websites that you would like to use this with, either let me know or make a pull request with the augmentation for that host.

setup

[sudo] gem install open-remote

making a git alias for 'git open' in your .gitconfig:

open-remote --alias

removing the alias, if you don't want it anymore:

open-remote --unalias

usage

git open

opens the first listed git remote. to open a specific remote, specify some of the remote or host name. for example:

git open bit
git open bucket
git open bitbucket

will all open the current repository's bitbucket remote in the browser. additionally, you can use the remote name to specify which URL to open:

git open origin

about

the original idea for this came from my friend charlie who initially provided me with a simple git alias that would do the same, but it only worked for repos that were https and was not platform independent. I was also inspired by the git-up ruby gem in how seamlessly it integrated with git. Here is the original git alias (made to work on osx), which charlie wrote (plop it in your .gitconfig, if you don't want to install a ruby gem to open most of your git remotes):

[alias]
    open-remote = "!open $(git remote -v $@ | grep -o 'http\\S*' | head -1); :"

testing

bundle || gem install bundler && bundle
rake # running open-remote's tests

todo

add support for ssb clients:
"ssb://%3HY71B7em4rZwMwz76yHIJZA1zo5BMBLd7Msh8LRFHI=.sha256"