{"thread":{"id":"15402","subject":"Howto forward workdir to HEAD","startedAt":"2008-09-06T21:32:39Z","lastAt":"2008-09-07T07:05:53Z","messageCount":3,"participants":["Thomas Koch","Junio C Hamano","Tarmigan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89950","messageId":"200809062332.39147.thomas@koch.ro","threadId":"15402","inReplyTo":null,"subject":"Howto forward workdir to HEAD","fromName":"Thomas Koch","fromEmail":"thomas@koch.ro","sentAt":"2008-09-06T21:32:39Z","receivedAt":"2008-09-06T21:32:39Z","isPatch":false,"sender":{"key":"thomas@koch.ro","avatar":null},"body":"Hi,\n\nI'm trying to setup an intranet Webapp using GIT for maintanance and\nbackup. First I created a git repo on my working machine and imported\nthe webapp, made some changes.\n\nThen I created a normal, non-bare repo at the server and pushed from my\nlocal repo into the server repo, checked out branch \"stable\" and\neverything is fine.\n\nNow I made a local change and pushed again, but the servers workdir is\nnot automatically forwarded to the pushed state. How do I forward it?\n\nCan I define a Hook that automatically forwards the workdir after a\npush, but only if the workdir is clean?\n\nWhat do you think of this method to deploy a webapp?\n\nBest regards,\n-- \nThomas Koch, Software Developer\nhttp://www.koch.ro\n"},{"id":"89952","messageId":"7vprngo31t.fsf@gitster.siamese.dyndns.org","threadId":"15402","inReplyTo":"200809062332.39147.thomas@koch.ro","subject":"Re: Howto forward workdir to HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-07T06:58:22Z","receivedAt":"2008-09-07T06:58:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Koch <thomas@koch.ro> writes:\n\n> Now I made a local change and pushed again, but the servers workdir is\n> not automatically forwarded to the pushed state. How do I forward it?\n\nhttp://git.or.cz/gitwiki/GitFaq?action=show&redirect=GitFAQ#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73\n"},{"id":"89953","messageId":"905315640809070005r6183a5f7n351b9bfd4df76af5@mail.gmail.com","threadId":"15402","inReplyTo":"200809062332.39147.thomas@koch.ro","subject":"Re: Howto forward workdir to HEAD","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2008-09-07T07:05:53Z","receivedAt":"2008-09-07T07:05:53Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"On Sat, Sep 6, 2008 at 2:32 PM, Thomas Koch <thomas@koch.ro> wrote:\n> Hi,\n>\n> I'm trying to setup an intranet Webapp using GIT for maintanance and\n> backup. First I created a git repo on my working machine and imported\n> the webapp, made some changes.\n>\n> Then I created a normal, non-bare repo at the server and pushed from my\n> local repo into the server repo, checked out branch \"stable\" and\n> everything is fine.\n>\n> Now I made a local change and pushed again, but the servers workdir is\n> not automatically forwarded to the pushed state. How do I forward it?\n\nPlease read http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73\n\n> Can I define a Hook that automatically forwards the workdir after a\n> push, but only if the workdir is clean?\n>\n> What do you think of this method to deploy a webapp?\n\nGenerally it is frowned upon.  The recommended way it to have a script\nor build process that you run from the git repo to populate the\nworkdir.  In addition to the reasons mentioned in the FAQ, you\nprobably also don't want your live website to be updated in some\nrandom order decided by git, but want to update it in a particular\norder to stay consistent for anyone who loaded it in the middle of the\nupdate.  This is best controlled by your makefile/script.\n\n-Tarmigan\n"}]}