git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tarmigan <tarmigan+git@gmail.com>
To: thomas@koch.ro
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Howto forward workdir to HEAD
Date: Sun, 7 Sep 2008 00:05:53 -0700	[thread overview]
Message-ID: <905315640809070005r6183a5f7n351b9bfd4df76af5@mail.gmail.com> (raw)
In-Reply-To: <200809062332.39147.thomas@koch.ro>

On Sat, Sep 6, 2008 at 2:32 PM, Thomas Koch <thomas@koch.ro> wrote:
> 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?

Please read http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73

> 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

      parent reply	other threads:[~2008-09-07  7:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 21:32 Howto forward workdir to HEAD Thomas Koch
2008-09-07  6:58 ` Junio C Hamano
2008-09-07  7:05 ` Tarmigan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=905315640809070005r6183a5f7n351b9bfd4df76af5@mail.gmail.com \
    --to=tarmigan+git@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=thomas@koch.ro \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).