git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with architecture git.
@ 2015-07-17 15:12 Alexander
  2015-07-17 17:10 ` Zoë Blade
  2015-07-17 18:06 ` Keller, Jacob E
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander @ 2015-07-17 15:12 UTC (permalink / raw)
  To: git

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. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with architecture git.
  2015-07-17 15:12 Problem with architecture git Alexander
@ 2015-07-17 17:10 ` Zoë Blade
  2015-07-17 18:06 ` Keller, Jacob E
  1 sibling, 0 replies; 3+ messages in thread
From: Zoë Blade @ 2015-07-17 17:10 UTC (permalink / raw)
  To: Alexander; +Cc: git

On 17 Jul 2015, at 16:12, Alexander <samarinav1992@gmail.com> 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ë.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with architecture git.
  2015-07-17 15:12 Problem with architecture git Alexander
  2015-07-17 17:10 ` Zoë Blade
@ 2015-07-17 18:06 ` Keller, Jacob E
  1 sibling, 0 replies; 3+ messages in thread
From: Keller, Jacob E @ 2015-07-17 18:06 UTC (permalink / raw)
  To: git@vger.kernel.org, samarinav1992@gmail.com

On Fri, 2015-07-17 at 15:12 +0000, 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. 

Sounds like you want the git worktree functionality currently being
baked.

git clone <remote>
cd <repo>
git checkout master
git worktree add <path/to/dev> dev

This allows you to have both master checked out at the location
path/to/dev and the master checked out where repo is stored. Quite
valuable

I think this solves what you're looking for? I don't know what version
git-worktree is supported by..

Regards,
Jake

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-17 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 15:12 Problem with architecture git Alexander
2015-07-17 17:10 ` Zoë Blade
2015-07-17 18:06 ` Keller, Jacob E

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).