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

Re: Problem with architecture git.

From
Zoë Blade <zoe@bytenoise.co.uk>
Date
Jul 17, 2015, 17:10 UTC
Message-ID
<7C98A500-2464-4409-B3EA-8E60325674EA@bytenoise.co.uk>
In-Reply-To
<loom.20150717T170829-906@post.gmane.org>
On 17 Jul 2015, at 16:12, Alexander <samarinav1992@gmail.com> wrote:
Show 7 quoted lines
> Hello,
> 
> I have problem with architecure of my project, help me to resolve problem 
> . I want to do in my remote repo two branches with two different working 
> folders (master , dev ) to check it . How can I do it ?
> 
> Thank you. 
You'll probably want something like this in your remote (presumably bare) repo's post receive hook:
#!/bin/sh

GIT_WORK_TREE=/var/www/html/www.foo.com git checkout master -f GIT_WORK_TREE=/var/www/html/www.foo.com git clean -f GIT_WORK_TREE=/var/www/html/dev.foo.com git checkout dev -f GIT_WORK_TREE=/var/www/html/dev.foo.com git clean -f

It's one-way, from Git to the directories only, but should do the trick.

Hope that helps, Zoë.

Previous: AlexanderNext: Keller, Jacob E
Message 2 of 3 in “Problem with architecture git.”
  1. AlexanderJul 17, 2015
  2. Zoë BladeJul 17, 2015
  3. Keller, Jacob EJul 17, 2015

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.