We are all creatures of habit. But when it comes to software development, some habits can be very detrimental to the health of your projects. Specifically I’m thinking about the habitual use of tools, or ways of using certain tools. Software development requires good habits for sure, but it also involves a lot of abstract thinking and a willingness to constantly be stepping out of the boxes that old habits can put you in.
In software development, one habit that is tough to break is switching tools. Especially when you’re relatively well-versed in specific tools, or specific ways of using them.
If you’ve ever worked on a software project with other developers, then you know how important revision control is. You need to be able to let multiple people work on the same files, modifying code that each of them contributes to in some way. And so you need a mechanism whereby you can track changes, document them, merge bits of code, or revert to previous versions of code, etc.
And as developers, most of us want to just code. We just want to build it. So while we know the importance of revision control for our source code, we don’t necessarily want to have to learn a new way of accomplishing it.
Git is a relatively recent addition to the family of source code management systems, created by Linus Torvalds, also the inventor of the Linux operating system. If you haven’t heard of Linus or Linux, and you’re into technology, you might want to considering changing your profession. Linus is arguably one of the most prolific developers and progressive thinkers / philosophers when it comes to technology.
Git has been gaining popularity rapidly, especially in the open source community but pretty much anywhere where developers are to be found. But I would wager that most people who are using it still don’t really understand why it’s special or how it works. And while you might be able to get by for a while using Git as if it were an old-school revision control tool, eventually you are bound to get yourself into trouble. And even if you don’t get yourself into trouble, without understanding what’s going on at least to some degree under the hood, you won’t really be leveraging the power that it gives you and your development team.
My team has been using Git as our source code management tool for development of Pressimus. The person who originally set up our Git repository is no longer with the team, and so we have just been using it without understanding it. We did this and got by with a lot of heartache and indigestion as we were finding that every time one of us had new code to push, the merges with the repo were awfully difficult to handle. It grounded our development effort.
Suffice it to say I actually hated Git for a while.
Until I decided that there was no way around it, I had to really learn it. So I set about doing that over the last couple of months. Could probably have finished sooner, but I also have a full-time day job, which is how I’m able to work on Pressimus without start-up capital (we want to build it and launch it ourselves!).
It was worth the effort. If you’re a developer, and you’ve found yourself using Git and ever at some point thinking or saying anything like the following:
“I hate Git!”
“Why is Git so complicated?”
“I’m afraid to push my code because I’m afraid it will break something.”
“I wish we were using some other source control tool.”
“Git is hard!”
“Git is more of a pain than it is worth.”
… then I highly recommend you stop. You’re in bad habit mode. Go learn Git. Read the online documentation, chapter for chapter. Take the time to really understand it. You will “Git” it. And then you’ll wonder what your problem was before, and why you wasted so much time harping over it. Git definitely has a learning curve associated with it. But it’s worth going through it.
I just finished setting up a new repository for Pressimus using Git. And I’m excited about the next phase of our development for Pressimus.
If you’re interested in learning Git, I would recommend you watch this video of Linus Torvalds talking about Git at Google in 2007. Still very relevant, and you’ll understand the philosophy behind Git. I always find that if I understand the “why” of something, then the “how” part becomes much easier. So go “Git” it. You won’t regret it.