git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can I use multiple worktree in same git repo  ?
@ 2011-07-20 12:54 J. Bakshi
  2011-07-20 13:25 ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 9+ messages in thread
From: J. Bakshi @ 2011-07-20 12:54 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello list,

Please bear with me as I am from svn domain and gradually making myself aware of git.

I have a site under htdocs which is modified by svn with the help of post-commit hook. But the svn folder structure is little different than the actual structure at filesystem.
Under htdocs/demo, say I have dir1, dir2 etc... where in svn I have the structure as 

[svn]
mysite-repo
|
|----------dir1------|trunk----src (here actually I have the contents of dir1)
|----------|---------|tags
|----------|---------|branches
|
|----------dir2------|trunk----src (here actually I have the contents of dir2)
|----------|---------|tags
|----------|---------|branches

And in file-system dir1 is mapped with (checkout from) and then (svn switch --relocate)  mysite-repo/dir1/trunk/src ;
dir2 is checkout from and then (svn switch --relocate) mysite-repo/dir2/trunk/src
and so on .....

Now the post-commit hook is tricky.

```````
#!/bin/bash

set -e

# LANG=en_US.UTF-8 for special character support

LANG=en_US.UTF-8 /usr/bin/svn up  /var/www/demo/dir1

LANG=en_US.UTF-8 /usr/bin/svn up  /var/www/demo/dir2

LANG=en_US.UTF-8 /usr/bin/svn up  /var/www/demo/dir3
````````````````

As a result whenever there is a commit , it updates the related folder in filesystem.
Say a commit at svn->mysite-repo->dir1->trunk->src ==> modify ==> /var/www/demo/dir1

Can I do the same in git with multiple worktree ? possible ?

Thanks

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

end of thread, other threads:[~2011-07-22  9:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 12:54 can I use multiple worktree in same git repo ? J. Bakshi
2011-07-20 13:25 ` Nguyen Thai Ngoc Duy
2011-07-20 16:12   ` J. Bakshi
2011-07-21  3:20     ` Nguyen Thai Ngoc Duy
2011-07-21  6:07       ` J. Bakshi
2011-07-21 18:17   ` Jakub Narebski
2011-07-21 18:22     ` Fredrik Gustafsson
2011-07-21 18:50       ` Jakub Narebski
2011-07-22  9:06         ` Sergio

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).