Github's Hub tool is pretty great

This is a pretty great tool.

I use it aliased to git, in which case it wraps your git commands with some enhancements and additional commands.

A few of my favourite commands

git sync (hub sync)

  • If the local branch is outdated, fast-forward it;
  • If the local branch contains unpushed work, warn about it;
  • If the branch seems merged and its upstream branch was deleted, delete it.
image.png

git pr list (hub pr list)

image.png

List PRs and create new ones form the command line.


git pull-request and git issue

Create issue and pull request directly from the command linef


Enhanced git checkout

You can now checkout directly from PRs.

$ hub checkout https://github.com/jingweno/gh/pull/73
> git fetch origin pull/73/head:jingweno-feature
> git checkout jingweno-feature


Comments