I don’t seem to have posted anything of value for quite a while. Of course it’s always debatable as to whether anything that I write is of ‘value’! I’ve written several draft posts in recent months but none of them have come to anything. This time I’m going to see if I can draft and commit a post on Git. Nice segway from a reference about committing a blog post to talking about Git you may have noticed there.
I’ve used CVS and SVN at work and I’ve used SVN for any personal projects that I’ve worked on at home, and they have served me well. SVN in particular. I have no real reason to use Git at the moment other than to give it a try, as I’ve heard a LOT about it in last two years or so, and to gain some experience in using it.
I didn’t want to mess around with having to set-up my own server and I didn’t want to spend lots of money on it. Ok I didn’t want to spend any money. Initially I considered GitHub as it almost seems to be the de facto standard for hosting of Git repositories. The thing with GitHub is that you can host a repo with them for free if it’s an open source project but you have to pay for private projects. Of course I don’t have an issue with that, they need to have some kind of business model where they make money. However I didn’t want to host my little project as open source. Just on principle really. It’s not that I am being precious about the code that I write but it just doesn’t seem right in principle. If I was writing a code library or framework then I would definitely host the code in an open source repo but not for a little personal coding project.
I’ve gone for Bitbucket instead where small private projects can be hosted for free. I cannot comment on the quality of their free service too much at the moment as it’s early days but all seems good so far. They also have a free GUI application that is, at the time of writing this post, I believe available for Mac OS only? The app is named SourceTree. I did download and install this app but it seemed better to gain some familiarity with the use of Git at the command line initially.
One thing that I have noticed in using Git for a very short time is that using it in a development team of one, i.e. just myself, does feel a little odd. When I’ve used SVN in the past I’ve not had this sensation. With SVN you have your local copy of your code and you commit to the repository depending on your regime, after a significant change or when you’ve made a change and everything runs correctly (i.e. compiles or whatever). Ok I have to admit that most of time I will make a commit once I’ve made a relatively minor change to my code and I simply want to make sure that I’ve got a backup. Also to ensure that I have a copy of that code that’s tucked away before I make further changes to it and break things so much that I want to return to that previous, working version. Because commits with Git mean that you still have code on your local drive, ok committed to the repo but still being held locally, the question in my mind is when do you make that push to the server?