loading...

Do you `git open`?

jasterix profile image Jasterix ・2 min read

I recently came across a reference to git open, a command that lets you open the GitHub page for your current repo. And with it, the answer to a lifetime's frustration with the multistep process of opening a repo on Chrome (not really).

Ecstatic, I opened my terminal and typed "git open".

git: 'open' is not a git command. See 'git --help'.

The most similar commands are
    clean
    clone
    notes
    prune

Okay...

A quick Google search brought me to this npm package by Paul Irish. Progress!

Following the instructions, I returned to my terminal and typed "npm install --global git-open". Initially, this didn't work for me. But while trying recreate the error to write this article, the command worked perfectly. Go figure.

/usr/local/bin/git-open -> /usr/local/lib/node_modules/git-open/git-open
/usr/local/bin/git-home -> /usr/local/lib/node_modules/git-open/git-open
+ git-open@2.1.0
added 1 package from 3 contributors in 0.443s

But if for some reason this doesn't work for you, continue reading. On a whim, I tried brew install git-open.

To my delight this works. Success!

==> Summary
🍺  /usr/local/Cellar/git-open/1.3: 4 files, 6.3KB, built in 3 seconds

Gif showing git-open in action

Now, if only there were some package I could install to view my terminal output history. Then I wouldn't have had to uninstall and reinstall git-open multiple times just to get the output above

Posted on by:

jasterix profile

Jasterix

@jasterix

Passionate about building great technology and connecting with people to create positive change. Find me elsewhere @jasterix or @_jasterix

Discussion

markdown guide
 

If you want to enhance the experience on the cli with more GitHub related features, I would also suggest taking a look at hub (hub.github.com/), it does a lot but really the only command I use is hub browse which seems to be equivalent to git open.

That being said, I didn’t know about and it’s really cool that it works with other providers like gitlab!

 
 

Thanks for the heads up

 

πŸ‘πŸ‘ I had no idea this was a git command. This is great!

 

Changed my life πŸ™ŒπŸΏ

 
 
 

This is SO useful, I'm definitely sharing with everyone I know.. Thank you for this! :)

 

Glad you found it helpful :D