A Question: I have an existing git repository with a working directory. I want to begin sharing this repository with a team. I have done the following: git clone --bare repo_dir repo_dir.git
and had the team clone the repo_dir.git
. Now I want repo_dir
to stay up-to-date with any changes pushed to the bare repo. The approach was to just remove the remote origin from repo_dir.git
and add a remote origin to repo_dir
pointing to the repo_dir.git
. That is:
cd repo_dir.git
git remote rm origin
cd ../repo_dir
git remote add origin ../repo_dir.git
I tried updating the original repo: git pull origin master
and it seemed to work fine but I am concerned that there may be some other configurations that, left unchanged, will lead to weird behavior. Is it ok to treat this original repo as a clone of the bare repo or must I make other changes? Does anyone have any insight here?
Thanks!