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
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
Top comments (9)
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!
Nice to know!
Thanks for the heads up
ππ I had no idea this was a git command. This is great!
Changed my life ππΏ
Very nice to know
A cool tip
This is SO useful, I'm definitely sharing with everyone I know.. Thank you for this! :)
Glad you found it helpful :D