GitHub from the command-line

blacktocat

Sociomantic releases new tool to ease workflow for GitHub merges

Today we are very glad to announce our first open source release of an internal tool to the general public!

Since we started using GitHub, we felt our workflow wasn’t covered by any tool out there. Sadly the GitHub Merge Button forces a merge commit, which can transform the git repository history into the NYC subway map. We wanted a history as linear as possible, to be able to actually look at the history and understand it, so we are basically rebasing every pull request, unless we have a good reason to do a merge.

This involved a lot of manual work, so we wrote a small script to do it for us, which grew into a full Git extension to interact with GitHub from the command-line.

We explored other other alternatives (like hub or ghi) but none of these tools do (or are targeted) at what we needed. The former completely replaces the Git command, the latter only handle issues, and none perform the automatic rebasing we needed to merge pull requests.

Some highlights about our git-hub tool:

  • Extends the normal Git interface by providing a new hub command
  • Bash auto-completion included
  • VIM syntax highlight when editing issues/pull requests/comments
  • Easy cloning (and forking if needed) from GitHub
  • Lists, creates and manipulates issues and pull requests
  • Full man page for help (use standard git hub --help to get help)
  • Converts issues to pull requests by attaching commits to them
  • Merges pull request by rebasing them (and handles conflicts)

Even when we are using this tool for our day to day work, we want to point out we consider this tool to be still in some kind of alpha state. There are some rough edges and some functionality missing, but we feel it is already very useful in the current state, and this is why we wanted to release it.

The whole project is hosted in GitHub itself, check it out! If you want to jump directly to the downloads, you should check the latest release, v0.4.1. We even provide a Debian package for convenience (tested with recent Ubuntu distributions). Also, for practical reasons (to ease installation and encourage people to try it), we kept the tool in one single file, so you can just download the git-hub script, make it executable and just run it! This will probably change in the future as the program keeps growing.

We encourage you to test it and send feedback to us (we’d love to receive both positive and negative experiences!), and of course, we accept pull requests too! ;)

At last but not least, this is released under the GPLv3 license to keep sharing and improvements flowing!

Back to news overview