Git Scripts Redux

development

In an earlier post I presented a number of rake tasks that were designed to ease git development. They helped mostly with managing branches, pulling from a remote branch (git-svn or plain ol git), and with pushing to remote branches. After using them for a while and getting others to use them, I discovered a problem

They actually make things harder. Consider the user who doesn’t know git that well, is coming from Subversion, and wants something to help ease the transition. A set of rake tasks to make git feel a bit more like Subversion sounds like a good thing, right? Well, yes and no. Yes in that they should allow you to use the more familiar concepts, but no in that, as written, they didn’t educate you about what they were actually doing under the hood. So you never learned about git-stash, the difference between git-fetch and git-pull, and more of that sort of thing. This is bad because you will become dependent on the tools, which is a problem because

Things go wrong. When a merge conflict happens in a rebase and most of the output is hidden from you, you cant fix it because (a) you have very little information about the problem and (b) you don’t even know what a rebase is! Granted, good tools can and do help with this sort of thing by providing help when things go wrong, but my tasks just didn’t do it enough. After a while I got to thinking about the tasks as suitable for someone who didn’t know git, and that was my mistake, because

These tools are meant for people who don’t need them. Only once I realized this did I start over, drop the sake-git project, stop using the thor-git project, and went back to pure git. After using that for a while, I noticed some of the same patterns that lead me to write the original tasks in the first place, so I decided to write (based on Rein Hs hack and ship) scripts for people who know what they’re doing, but want to do it faster. They’re written in bash, they’re fast, they tell you whats going on, they don’t hide anything, and they’re a gist with an installer, but nothing else.

Enjoy.