git ready

learn git one commit at a time
by Nick Quaranto

easily manage git remote branches

committed 11 Mar 2009

Checking out remote branches, deleting them, and publishing new ones is part of most Git users’ daily workflow. But seriously, who wants to type that much? I certainly don’t, and you shouldn’t have to either.

Enter git_remote_branch, a helpful RubyGem for just this task. It installs a new executable to help take some of the chore of working with remotes away. Here are some of the commands it has:

grb create branch_name [origin_server]

grb publish branch_name [origin_server]

grb rename branch_name [origin_server]

grb delete branch_name [origin_server]

grb track branch_name [origin_server]

What’s awesome about it is that it shows what Git commands are running underneath it, so it’s quite easy to figure out exactly what’s going on.

It also has an explain command built in that dumps out the commands directly.

Provided you have RubyGems installed, simply do gem install git_remote_branch and you’re set! Check out the code on GitHub if you have ideas on how to make it better (or want to write your own helpful commands based off of it!)

If you know of other helpful shortcuts that can help out Git users, submit a tip!