Setting up a git server in Ubuntu with gitosis and using gitextensions on Windows
When writing code, you want to use some sort of version control system. Trust me, you want it. I had a project I worked on for 4 weeks and a couple of hours before the deadline I mad a mistake. I was making a class diagram from existing code and realized that a certain UML tool thinks it’s a good idea to delete a class from the project folder when you decide that you don’t want that particular class in your diagram. I guess that makes sense… on a planet where all software developers are masochists. Anyway, that little mistake could have been a serious problem (and a simple “Oops, sorry I deleted all the code by accident, kthxbye” wouldn’t have cut it), but luckily I had it stored in my dropbox folder which backs everything up on the dropbox servers and they provide an ‘undelete’ option.
I’ve been trying to setup a git server on my server which runs Ubuntu Server 9.10, but I had a lot of problems partly due to the fact that I couldn’t find a lot of information when something went wrong. But I’m a stubborn person so I persevered and succeeded in the end. This post is for those who want to setup a git server on Ubuntu and want to use git on Windows, especially with Git Extensions. This tutorial consists of two parts: setting up the server and setting up gitextensions on Windows, but there will be some switching between the server and the local Windows machine so please pay attention.
There are a lot of tutorials that cover setting up a git server but this one is a full guide to setting up a git server and the tools necessary to work with git on Windows. It also has some information I found on some mailing lists and forum posts that I found after a lot of searching. Still I take no credit for this tutorial for it is merely a collection of information I found. All credit goes to the people who actually tested these steps and bothered putting it on the internet for other people struggling with this. I try to explain everything as thorough as possible so it is a lot of text, but it’s not hard. Just read carefully and you will have git running in no time!