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
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)
"I have a few different computers that I use at home and I wanted to set up GIT that I can access my code from any of them. It took me a bit because I was too used to working with a client-server model where I designate one machine as the "server" that holds the repository and everything else was a client. Instead, GIT seems to operate more like a merge tool and every local copy is its own "master." Once I understood that, it turns out that setting up GIT is very simple and just needs GIT itself and SSH".
To read more you can check this link: http://blog.lazyhacker.com/2010/04/setting-up-git-for-home-network.html
We use TortoiseGit. The URL's it accepts are //machinename/shared/repo.
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.
Update August 2014 (4 years later), Git 2.1
Commit c2369bd by Eric Sunshine and Cezary Zawadka (czawadka) means a simpler UNC path now work:
Eric Sunshine fixed
mingw_offset_1st_component()
to return consistently "foo
" for UNC "//machine/share/foo
", cf this thread.
So this should now work:
git clone //mymachine/shared/repo.git
My post has a step by step guide to creating a distributed git repository using a windows share. I've found that a windows share works fine for small projects.
http://www.dalsoft.co.uk/blog/index.php/2011/08/30/getting-started-with-git-on-windows/#Creating_a_distributed_repository