Hosting Git repository on a Windows LAN


Recently, I had a small team of developers and was looking to setup a version control system for them.

I evaluated many tools like VSTS, Subversion and finally decided on Git repository hosted on a Windows LAN.

First of all, find or create a network share on which everybody will have a read/write access. For example: \\Group03\Silverlight_Projects\EXCEL\Solution

First of all, you need to create a blank bare repository at this location. However, since you cannot cd into a network shared location, we will use pushd command as follows:

pushd \\Group03\Silverlight_Projects\EXCEL\Solution

This command will map it to a network drive and cd into it.

Create a bare git repository.

git init --bare

Now all we need to do is add the newly created remote bare repository to our local repo and push our code up.

git remote add origin //Group03/Silverlight_Projects/EXCEL/Solution
git push origin master