> What you described is in fact just a case of "post receive" deployment
> of a certain branch.  Hence you just google for something like
> git+deployment or git+web+deployment and study the proposed solutions.
> Usually the deployment is done by a post-receive hook created in the
> target repository.
> There are usually two approaches to this:
> 1) The remote repository is a non-bare (normal) repo consisting
>    of the work tree and the ".git" directory in it.
>    You check out the branch you want to "expose" in that repository,
>    configure the repository to allow pushes to that branch
>    by setting the receive.denyCurrentBranch conf. variable to "false"
>    and then arrange your hook to force-update the work tree, say,
>    by running `git reset --hard HEAD` in it.
>    Then after each push to the branch which is checked out, the work
>    tree will be updated.  Obviously, you should never do any development
>    in that work tree.
> 2) The remote repository is a bare repo, and your hook arranges for
>    updating some specific directory after the branch being monitored
>    is updated.  This is trickier than the first case but might be
>    thought of as being more clean design.
>    There are also several ways to update the location to be exposed.
> I suggest you to study what you'll google on this topic and make your
> pick as there's no one true solution.

The remote repository is already bare, so option 2) is likely the direction
that I'll need to go. I seem to have found some good documentation referencing
how to do this.

Your response was very helpful and the search terms you suggested quickly
yielded helpful answers. Thank you.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to