On Tue, May 08, 2018 at 06:35:33PM +1000, Russell Coker via luv-main wrote:
> It seems that I have to create the master repository with "git init --bare"
> and then push from the slave after adding a file.  Adding a file on the
> master is also apparently a bad idea.
> 
> This is annoying, pity git is what all the cool kids use nowadays.

Yeah, if you need a checked out workspace on the remote, the usual pattern is
to use a hook to do it.

We have a $GIT_DIR/hooks/post-update and something along the lines of

        #!/bin/sh
        #
        # An example hook script to prepare a packed repository for use over
        # dumb transports.
        #
        # To enable this hook, rename this file to "post-update".

        echo
        echo "* Updating devel repository *"
        echo

        cd /shared/remote/master || exit
        unset GIT_DIR

        git checkout -- .
        git pull --rebase origin

There may be better ways (post-receive, more robust script).  It was set up
almost a decade ago now :-)


K
_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Reply via email to