Open a Github Repo Quickly from the Command Line

If you are a sysadmin or developer that uses a lot of repos throughout the day, and you use Github, this little snippet will come in handy. No more opening a browser window and fumbling around trying to navigate to your repo. Just type gh anywhere inside your project path and a browser window will open your repo on Github.

For this to work, you’ll need to do two things:

  1. Copy the snippet to ~/bin/gh
  2. Make it executable by running: chmod +x ~/bin/gh
  3. Reload or restart your terminal, browse into a Github project, type gh and boom!
Advertisements

Let me know if you try it...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s