From: Zoë Blade Date: Fri, 17 Jul 2015 17:10:00 GMT Subject: Re: Problem with architecture git. Message-ID: <7C98A500-2464-4409-B3EA-8E60325674EA@bytenoise.co.uk> In-Reply-To: On 17 Jul 2015, at 16:12, Alexander wrote: > 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ë.