git-wtf

I've released a fairly preliminary version of git-wtf to my collection of Git tools. This is something I've been working on recently to help wean myself away from excessive gitk usage. From the description:


If you're on a feature branch, it tells you which version branches it's merged into. If you're on a version branch, it tells you which feature branches are merged in and which aren't. For every branch, if it's a tracking branch, it tells you which commits need to be pulled and which need to be pushed.


So basically if you find yourself with a ton of branches (which invariably happens if you use feature branches in Git) or you find that keeping track of branch state is generally hard, and that gitk is confusing as often as it is useful, this is the tool for you.

By default it assumes that any branches named "master", "next" or "edge" are version branches, and all other branches are feature branches. This is configurable, of course. It also warns, for tracked branches, if both the remote branch and the local branch have new commits, i.e. git pull would create a merge commit and you should rebase instead. If you don't care about this type of thing, this might be annoying.

The main thing addition I foresee in the near future is a warning if merging in a feature branch into a version branch would collapse two version branches. Something like: when merging a feature branch into a version branch, warn if the feature branch contains commits reachable from any version branch and not reachable from master.

0 comments:

Blog Archive