Before anyone jumps in and refers me to a prior post, let me say, I've gone through all of them with no success.
As the title says, I'm trying to setup a shared git repository on a Windows file server using local path (e.g. s:\SharedProjects\foo
), where each developer has a local repository (e.g. c:\MyProjects\foo
).
So far I've managed to create / clone the repository, but I can't push back changes from local user to shared dir. I've tried setting it as --bare
repository, I've tried setting --git-dir
and --work-tree
, but I always different problems.
Setting the repo as bare, all of the git-dir files (.git/*
) reside immediately below my root directory (s:\SharedProjects\foo\[config, HEAD, ..*]
), and does not allow me to perform other repository tasks such as git ls-files
or git status
, saying these operations must be made in the working directory.
The I set the working directory above my bare repository (e.g. \SharedProjects\bar
), and I can't perform any operations on that because it doesn't recognize a git repository :|
I'm going crazy here.. I've been trying every which way I can to set the --git-dir
and --work-tree
, setting my repository as --bare --share=everybody
.. I lost track of where I'm at now!
Can someone please give specific step by step instructions on crating a repository (on a Windows file share) that will allow for central repository management as well as local repository push / pull operations?
Thank you all in advance!
To setup your 'Remote' Repo
cd s:/SharedProjects/foo
git init --bare
To Setup your local repo
cd c:/MyProjects/
git clone s:\SharedProjects\foo foo