I mentioned a few weeks back that I’ve switched to using Vim as my main editor, and couldn’t be happier. A lot of that was due to my personal dislike for features which are becoming increasingly common and difficult to disable in popular IDEs, and which I can completely disable within Vim. But to be honest, most third-party editors would work just as well; Vim just works for me. Others can (and do!) prefer Notepad+, Emacs, TextEdit, SublimeEdit, and others. The key point I wanted to make to other programmers is that it’s worth experimenting with text editors — there’s no need to lock yourself to the one that came with your IDE!
Anyhow. At a similar time to when I started using vim, I started experimenting with using git, rather than subversion, for source control. This wasn’t for any special reason, just that I’d been learning a little git (since it’s very popular amongst vim users), and wanted to make a lightweight repository for tracking changes to my Vim preferences. And then for fun, I imported the MMORPG Tycoon 2 history into git
For me, the best feature of git, compared against subversion, is the ease with which it handles branching and merging, which were always at least mildly painful under subversion. With git, though, it’s so easy to maintain separate streams of development that suddenly, I’m finding that I can work on several features at once, each separately from each other. The screenshot above shows a graphical view of the current MMORPG Tycoon 2 codebase. Right now, I have four different feature branches running, some for core features (“context” is for figuring out how to handle the context actions which I’ve previously shown in a “context matrix”), and some experimental (“duothreadman”, which is doing comparitive performance testing by maintaining two separate pools of threads, so that a glut of low-priority tasks can’t clog up the task queue). If a feature branch works out well, I can merge it back into the master branch. If not, I can just delete it and it doesn’t clutter up my repository any more.
Under git, it takes a fraction of a second to create a new feature branch, or to switch from one to another. These operations would have taken several minutes each under subversion, and been major undertakings which had to be carefully considered and executed. But they’re trivial now; not even worth spending time thinking about. Just make the branch, and delete it later if it turns out to have been a bad idea.
This sort of flexibility means that when I’m feeling blocked on one task, I can easily set it aside and work on a different task, without having to struggle to keep the two sets of changes distinct from each other. And that’s tremendously freeing.