Search code examples
gitsvnversion-controlsambatortoisegit

What is the quickest way to manage Git over a network?


I'm a web developer and Subversion/TortoiseSVN user who is looking to jump over to Git as we are starting to need branching and from what I have read, Git is faster and manages branching much better.

Our SVN Setup

Our SVN setup is based on a central Linux server accessed through Samba shares. It has Apache, MySQL, PHP, etc. installed, allowing us to test locally on an environment similar to our online live server. We have set up a share which hosts the SVN repositories and development environments (repository checkouts). This allows us to develop in real time, test and view each other's development environments over the local network before committing. So, all checkouts/updates/commits/development are done via a Samba share over a network. No development is done on any other box. We noticed TortoiseSVN/SVN starting to bog down lately and found the branching quite slow. So, we are looking to move to Git.

Setting up Git

In an attempt to set up a similar environment to our SVN setup, I have installed Git on the Linux server, installed TortoiseGit on my windows 7 machine. I then proceeded to follow instructions of cloning an SVN repository to Git. This has gone well and kept my log intact.

Setting up a Git Development Environment

I then created a development environment and did a 'Git Clone' from TortoiseGit which took a few minutes (as I expected). Do I presume correctly that this is the same as svn checkout from TortoiseSvn? I then made some changes to files and opted for 'Git Comment -> master...'. Do I presume correctly that this is the same as svn commit? This is where things took a rather long time.

Where Git Slows Down

Firstly, it took ages for it to display the files that have changed (around 45 seconds) despite me only changing 2 files. This would normally occur within 2-3 seconds on TortoiseSVN. I then proceeded to commit in which took around another 30 seconds when it probably would have been less than 5 seconds on TortoiseSVN.

Some might ask why I'm moving as the times above for SVN aren't bad. Keep in mind, this is a simple example. Normal usage would make SVN take a lot longer.

Looking for Solutions

I did find another person on Stack Overflow with a very similar issue, but there wasn't any actual resolution. Doing things via ssh/commandline isn't an option as a few of the developers aren't very good with that kind of stuff and know nothing about Linux.

So, is there something I can do to make this work faster over the network? Or, perhaps a better alternative to TortoiseSVN to manage the committing, branching, etc.? We are trying to keep the steps we have to take to a minimum to keep things speedy.


Solution

  • Don't expect git to be fast if you have your working copy on a server share. Git is meant to be run locally, and pushed/pulled remotely.