git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: mail@samtuke.comNext: Neal Kreitzinger
Message 2 of 3 in “Adding non-bare branches to a non-bare repository”
  1. mail@samtuke.comMar 3, 2011
  2. Michael J GruberMar 3, 2011
  3. Neal KreitzingerMar 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.