Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Coming from SVN world - need help

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:51:35

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help