From: "J. Bakshi" <joydeep@infoservices.in>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: can I use multiple worktree in same git repo ?
Date: Wed, 20 Jul 2011 18:24:38 +0530 [thread overview]
Message-ID: <20110720182438.3c40cf1d@shiva.selfip.org> (raw)
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
next reply other threads:[~2011-07-20 12:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 12:54 J. Bakshi [this message]
2011-07-20 13:25 ` can I use multiple worktree in same git repo ? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110720182438.3c40cf1d@shiva.selfip.org \
--to=joydeep@infoservices.in \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).