Howto forward workdir to HEAD
Hi,
I'm trying to setup an intranet Webapp using GIT for maintanance and backup. First I created a git repo on my working machine and imported the webapp, made some changes.
Then I created a normal, non-bare repo at the server and pushed from my local repo into the server repo, checked out branch "stable" and everything is fine.
Now I made a local change and pushed again, but the servers workdir is not automatically forwarded to the pushed state. How do I forward it?
Can I define a Hook that automatically forwards the workdir after a push, but only if the workdir is clean?
What do you think of this method to deploy a webapp?
Best regards,
Signature · 2 lines
Thomas Koch, Software Developer http://www.koch.ro
Quoted 2 lines · Thomas Koch
Now I made a local change and pushed again, but the servers workdir is not automatically forwarded to the pushed state. How do I forward it?
Quoted 6 lines · Thomas Koch
Hi,
I'm trying to setup an intranet Webapp using GIT for maintanance and backup. First I created a git repo on my working machine and imported the webapp, made some changes.
Quoted 6 lines
Then I created a normal, non-bare repo at the server and pushed from my local repo into the server repo, checked out branch "stable" and everything is fine.
Now I made a local change and pushed again, but the servers workdir is not automatically forwarded to the pushed state. How do I forward it?
Please read http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73
Quoted 4 lines
Can I define a Hook that automatically forwards the workdir after a push, but only if the workdir is clean?
What do you think of this method to deploy a webapp?
Generally it is frowned upon. The recommended way it to have a script or build process that you run from the git repo to populate the workdir. In addition to the reasons mentioned in the FAQ, you probably also don't want your live website to be updated in some random order decided by git, but want to update it in a particular order to stay consistent for anyone who loaded it in the middle of the update. This is best controlled by your makefile/script.
-Tarmigan