Is it safe to use git with multiple users when the repository is on a windows file share?
We are a team of less than ten persons that need to quickly set up a git repository that supports active directory based authentication.
The simplest solution seems to be to use a file share with a git repository and reaching it using a unc path, e.g.
git clone //server/share/repo.git
However, we are a bit worried about robustness. Are there no issues with concurrency when several people use the same git repository and there is no actual server component running?
Clients are running windows 7, server is Windows Server 2008R2. Using msysgit 1.8.1.2
(I am well aware that there are many other git server solutions, but, especially given the requirement of AD authentication, they are not as simple to set up)
Solution 1:
I assume you're asking Is this likely to result in repository corruption?
If so, the answer is No.
If you're using the repository the way it's designed to be used (clone, work, commit, push) this should work fine, even if the push target is a UNC path (git
will treat it as if you were pushing to a local path, and deal with locking accordingly).
You may however encounter permissions-related problems -- you're going to want to be sure all the users who are supposed to have access to the repository have appropriate NTFS permissions (group memberships, etc).
You may also want to check out this Stack Overflow question about setting up git servers on Windows to see if there's a cleaner way that will work for you.
Solution 2:
Git has its own locking management, you can use whatever shared storage you prefer.
For some good-to-use configuration parameters, take a look at:
http://nelsonslog.wordpress.com/2011/03/12/using-git-on-windows-via-smb/