tags:

views:

349

answers:

3

Hi to all!

My colleagues and I are thinking of giving git a try and see if we can easily move to it. We work on a Windows-only environment. On our own machines we already have git set up with mingw32 and SmartGit as gui client.

Is there an easy approach based more on the concept of sharing folders than on the concept of "hosting server"? For example, we wanted to host a git repository on a folder shared on the lan, clone it on our machines and see how to push our changes back to that folder, merge them and so on.

Our first problem was cloning from the lan. Of course git doesn't recognize paths like \\mymachine\shared\repo

How to start with our approach? Is to doable? Any advice?

Thanks in advance.

EDIT

As suggested, a command line approach worked. We also had to invert the slashes, so that git clone //machine/directory/repository did the trick. Now, my colleague had a local copy working, made some changes... How to push them back to the shared folder?

Push and Fetch work on local paths too, we're up and running with our tests. Thank you all!

+1  A: 

My advice sidesteps your efforts a bit, but I've been using Mercurial in exactly the same approach you've described here, and if it's not too much of a plan change, I'd encourage you to give using TortoiseHg a try. Mercurial works with file path based repositories exactly the same way it works with "served" repositories (e.g. it will recognize \\server\shared_repo\repo_path as a valid repository path to clone from.)

As an additional point, from what I can tell, Mercurial's Windows support is pretty far along, whereas git still has some fringe compatibility issues (although it appears that you've addressed many of the biggest challenges to using git on Windows already)

Kit Roed
+2  A: 

We use TortoiseGit. The URL's it accepts are //machinename/shared/repo.

Joel Lucsy
Plain Git should accept URLs such as these without issue as well. Failing that, another possible approach might be to have every team member map the shared folder to a chosen drive letter (e.g. X:) and use that instead.
Splash
+2  A: 

For a pure command-line solution, did you try

 git clone file:///local/path/to/repo-name.git

In your case:

 git clone file:///\\mymachine/shared/repo.git

It should work just fine.

VonC