Skip to content
Omar Abdel-Wahab edited this page Oct 1, 2013 · 3 revisions

Gub

Frustrated by the fact that I have to leave my terminal to do basic stuff on Github, I created this CLI to make my visits to Github.com minimal and focus on the code.

Setup

The first thing you need to do is to run:

$ gub setup

This will ask for your username and password to request a Github token which will be stored (your password won't).

List repositories

You can then list all your repositories:

$ gub repos

Clone an existing repository

Suppose you have forked someone/example at myuser/example. You may do:

$ gub clone myuser/example

This will clone and set a remote named "upstream" to follow someone/example.

List repository issues

You then can do:

$ gub issues

And it would list all issues on myuser/example if it has issues enabled. If not, it will list issues from someone/example.

You can filter issues assigned to you by adding --mine to the command.

Working on issues

Starting

You may then do:

$ gub start 123

And it would synchronize your master with someone/example, then creates a new branch issue-123 and finally will checkout the issue-123 branch.

Finishing

When you're done working on an issue and still have the issue-123 checked out, execute:

$ gub finish

Which will automatically add a pull-request to issue #123.

Help

To list all available commands, execute:

$ gub help

If you need help for a specific command, repos for instance, execute:

$ gub help repos