Gitolite update copy at server when push -


in gitolite i've set new repository on server , able clone machine. it's web project need latest working copy @ /var/www/my-project, every push made developer update files there. how can achieve that?

thanks

the repos managed gitolite managed in ~/repositories

you can add own hook in ~/repositories/yourrepo.git/hooks called post-receive hook in order checkout, on each push, index working tree of choice (like /var/www/my-project)

see instance "how process files on branch in post-receive hook in git" (which can check branch pushed).

the checkout uses:

git checkout --work-tree=/var/www/my-project 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -