{"thread":{"id":"39873","subject":"Problem with architecture git.","startedAt":"2015-07-17T15:12:57Z","lastAt":"2015-07-17T18:06:10Z","messageCount":3,"participants":["Alexander","Zoë Blade","Keller, Jacob E"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"266242","messageId":"loom.20150717T170829-906@post.gmane.org","threadId":"39873","inReplyTo":null,"subject":"Problem with architecture git.","fromName":"Alexander","fromEmail":"samarinav1992@gmail.com","sentAt":"2015-07-17T15:12:57Z","receivedAt":"2015-07-17T15:12:57Z","isPatch":false,"sender":{"key":"samarinav1992@gmail.com","avatar":null},"body":"Hello,\n\nI have problem with architecure of my project, help me to resolve problem \n. I want to do in my remote repo two branches with two different working \nfolders (master , dev ) to check it . How can I do it ?\n\nThank you. \n"},{"id":"266253","messageId":"7C98A500-2464-4409-B3EA-8E60325674EA@bytenoise.co.uk","threadId":"39873","inReplyTo":"loom.20150717T170829-906@post.gmane.org","subject":"Re: Problem with architecture git.","fromName":"Zoë Blade","fromEmail":"zoe@bytenoise.co.uk","sentAt":"2015-07-17T17:10:00Z","receivedAt":"2015-07-17T17:10:00Z","isPatch":false,"sender":{"key":"zoe@bytenoise.co.uk","avatar":"https://avatars.githubusercontent.com/u/502434?v=4"},"body":"On 17 Jul 2015, at 16:12, Alexander <samarinav1992@gmail.com> wrote:\n\n> Hello,\n> \n> I have problem with architecure of my project, help me to resolve problem \n> . I want to do in my remote repo two branches with two different working \n> folders (master , dev ) to check it . How can I do it ?\n> \n> Thank you. \n\nYou'll probably want something like this in your remote (presumably bare) repo's post receive hook:\n\n#!/bin/sh\n\nGIT_WORK_TREE=/var/www/html/www.foo.com git checkout master -f\nGIT_WORK_TREE=/var/www/html/www.foo.com git clean -f\nGIT_WORK_TREE=/var/www/html/dev.foo.com git checkout dev -f\nGIT_WORK_TREE=/var/www/html/dev.foo.com git clean -f\n\nIt's one-way, from Git to the directories only, but should do the trick.\n\nHope that helps,\nZoë."},{"id":"266258","messageId":"1437156370.4883.14.camel@intel.com","threadId":"39873","inReplyTo":"loom.20150717T170829-906@post.gmane.org","subject":"Re: Problem with architecture git.","fromName":"Keller, Jacob E","fromEmail":"jacob.e.keller@intel.com","sentAt":"2015-07-17T18:06:10Z","receivedAt":"2015-07-17T18:06:10Z","isPatch":false,"sender":{"key":"jacob.e.keller@intel.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Fri, 2015-07-17 at 15:12 +0000, Alexander wrote:\n> Hello,\n> \n> I have problem with architecure of my project, help me to resolve \n> problem \n> . I want to do in my remote repo two branches with two different \n> working \n> folders (master , dev ) to check it . How can I do it ?\n> Thank you. \n\nSounds like you want the git worktree functionality currently being\nbaked.\n\ngit clone <remote>\ncd <repo>\ngit checkout master\ngit worktree add <path/to/dev> dev\n\nThis allows you to have both master checked out at the location\npath/to/dev and the master checked out where repo is stored. Quite\nvaluable\n\nI think this solves what you're looking for? I don't know what version\ngit-worktree is supported by..\n\nRegards,\nJake\n"}]}