git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Howto forward workdir to HEAD
@ 2008-09-06 21:32 Thomas Koch
  2008-09-07  6:58 ` Junio C Hamano
  2008-09-07  7:05 ` Tarmigan
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Koch @ 2008-09-06 21:32 UTC (permalink / raw)
  To: Git Mailing List

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,
-- 
Thomas Koch, Software Developer
http://www.koch.ro

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Howto forward workdir to HEAD
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-09-07  6:58 UTC (permalink / raw)
  To: thomas; +Cc: Git Mailing List

Thomas Koch <thomas@koch.ro> writes:

> 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?

http://git.or.cz/gitwiki/GitFaq?action=show&redirect=GitFAQ#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Howto forward workdir to HEAD
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Tarmigan @ 2008-09-07  7:05 UTC (permalink / raw)
  To: thomas; +Cc: Git Mailing List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-07  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).