can I use multiple worktree in same git repo ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]