For the context switchers - git branch I/O
At work I'm switching contexts quite often. While working on a long-term feature, I'll have to switch to do a bug fix, then I'll have to add a feature request that's done in a few hours and so on…
Usually I end up with several git branches in my working copy. For example, currently I have three branches:
$ git branch issue3521 master * work
One goes upstream ("master"), one for instant fixes ("work"), one feature branch ("issue3521").
To get a quick overview of the current state of all branches I've added a very simple git extension to my setup that shows incoming and outgoing commits for each branch. I found the script (besides the issues it has) quite useful. It gives me just as little information as needed to orient myself after a couple of changes here and there. It just visualizes incoming and outgoing commits relative to a branch.
The following screenshot illustrates it's usage. The colors have the following meanings:
| green | everything's fine |
| blue | almost ok |
| yellow | take care |
| red | do something |
(Note, git bio is just an alias to git branch-io.)
So in that case I should keep an eye on issue3521 to keep it in sync
with master, should merge back one commit from work to master and
definitely should to something about the branch called outofdate.
If you want to give it a try, here's the extension (gist.github.com).