I use the following set up for my @dev site:

(a) ../git/repository/dev

where I keep version control using git,

and a separate

(b) ../htdocs/dev

that I have an almost exact copy of git repositor (a) used by the http server

How to make sure git repository (a) is always in sync with http (b) ?

I don't want to version control (b) directly from various reasons.


use the "post-update" hook in the /hooks directory provided in your .git directory to push a copy (sans -gitignore- the files not needed) each time you make git commits to your dev files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.