Re: Adding non-bare branches to a non-bare repository
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Mar 3, 2011, 14:23 UTC
- Message-ID
- <4D6FA465.2060703@drmicha.warpmail.net>
- In-Reply-To
- <201103031053.35864.mail@samtuke.com>
mail@samtuke.com venit, vidit, dixit 03.03.2011 11:53:
Show 17 quoted lines
> Hi, > > My website is a non-bare git repository. I have a copy of the website for > testing purposes which is a separate git repository. Currently these two > repositories are not aware of each other, and I copy across files from one to > the other in order to bring features from the test repo into the live site. > > I would like to make the testing repository into a branch of the live website > repository so that I can easily merge in changes from one to the other. > > Both repositories need to be complete copies of files as they are web > accessible and must be functional. > > Is this possible? > > In future I also need to make a third copy of the site to have a beta as well > as an alpha testing copy of the website.
You probably should replace "branch" by "clone" in all that you have said above.
There is no problem adding a non-bare repo as a new remote to an existing non-bare repo. You can easily fetch from such a repo. The only problematic thing is pushing to a branch in a remote repo which is checked out there.
Michael