So let's say you have a project that is so hawt, that you literally can't afford to let your trusty ISP see what you're working on. I know everyone loves and trusts names like Comcast, and AT&T to do the right thing in every circumstance, no matter what, but that's beside the point. Sometimes the project you're working on simply _feels_ so epic that it deludes you into a reality where you are the very k-raddist of the k-rad, and everyone else... is out to get your lucky charms. You want CAPITAL_SECRECY. Well, that's not technically possible if you're connected to the internet for extended periods of time with a private source operating system or are using a piece of networking gear with unverified origins (*cough* ebay *cough* 50% discounted Cisco equipment *cough* smelled a bit like solder when you first got it *cough*), but hey, let's just pretend that everything is hunky~dory in that department... and you are super-duper spy secret agent man!

You've probably already been looking at git for version control since you like to keep in touch with the latest trends in order to either benefit from them or ridicule their egregious flaws (if not see here).

For codesharing with git, the goto response is "github" of course. Well, your central repository doesn't _need_ to be publicly available as an open source project at github.com. In fact, it can be furtively tucked away at 192.168.1.3! So let's get started!

There are two methods. You only need to worry about the SSH method because the git protocol method is buggy and actually won't work if you're pushing from a windows machine. Since I intend to move cshrp code, that method does me absolutely no good what so ever.

:::::::::The SSH protocol method:::::::::
The SSH protocol method is less buggy on windows machines, but is less efficient over the network (negligable over LAN).

My first step was to init the git repos for my C# code on my windows machine. Then I initialized "bare" repositories on my linux machine. Bare repositories are the only kind of repos that will accept push requests. They don't have a working directory. That means, to get the files out, you just clone the repository.

From there you can do the usual $ git push and of course $ git pull as you always could with github, only under this setup you may need to type your password to your personal "git server" for the user name USER.

The --base-path=.. part just means, go up a directory from where we are, and make that the root. If you omit this part of the command, you'll have to specify the absolute path to your repo, instead of that relative path.

git clone git://192.168.1.3/absolute/path/to/your/repo

The --enable=receive-pack part gives everyone and anyone write access to your repo. Dangerous, but teh sex, so keep it in otherwise you can't push to your repo. The dangerous are that if anyone can guess your repo's folder name, guess when you will start the git server, and crack through port 9418, they could potentially mess with your codezstuffz so bare that in mind.

----Optionals----

The --reuseaddr only means that it should listen on the default git port even if something else already has the port open. You probably won't need to use this switch, but just in case it's getting a shout out here.

The --export-all chunk would seem to allow the export of git repos. It seems somewhat dangerous so I haven't thrown it in.

The --verbose flag can be used to make the server console output more information.

but again, I should point out, msysgit is too buggy to work with the git protocol, so you'll need to use the ssh protocol instead.