git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Coming from SVN world - need help

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jul 14, 2011, 06:08 UTC
Message-ID
<CALkWK0nboCCGWhcKMgv6Y4FWgfsdhatEf78sSQCAMcKe2HU0FA@mail.gmail.com>
In-Reply-To
<20110714110318.7726251c@shiva.selfip.org>
Hi Bakshi,
J. Bakshi writes:
> Actually the practical scenario is different than just a bare repo. The repos should be connected with its working copy located at htdocs directory. So whenever someone commit anything in git the corresponding working directory should be updated accordingly with a post-commit hook. I have done the same in svn but don't know how git will help to achieve this ? The main part, How can I simply map the folder in htdocs with it's master in git repo ? As "git clone" actually creates the parent folder. In svn it was easy with

In the bare repo, set core.worktree to the htdocs directory*, and put something like this in your hooks/post-receive: #!/bin/sh git checkout -f

* For more, read about detached worktrees in Git
-- Ram
Previous: J. Bakshi
Message 4 of 4 in “Coming from SVN world - need help”
  1. J. BakshiJul 13, 2011
  2. Erik Faye-LundJul 13, 2011
  3. J. BakshiJul 14, 2011
  4. Ramkumar RamachandraJul 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.