Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] git: push from behind the firewall

Darren Cook writes:

 > Another git question, that has me wondering if I'm trying to use it
 > wrongly, or missing out on some clever command that only the gurus know
 > about. [1]

There's nothing wrong with what you're trying to do, but The Gurus
Just Don't Do That with git.  So git is not designed to make it
possible.  In general, git is designed around the concept that
things-that-you-push-to are "bare repositories" containing only the
contents of .git.

 > # The git equivalent of "svn export"
 > git checkout-index -a --prefix="tmp/"
 > # Copy the files
 > rsync -avz --delete tmp/
 > # Tidyup
 > rm -rf tmp/

Looks reasonable to me.

 > Getting more sophisticated, I don't want documentation, examples, etc.
 > uploaded, and also don't want the live server error logs and data
 > deleted, so this may be better:

You may want to use submodules.  See the other thread.

 > [1]: I started this email thinking I needed some clever ssh pipe
 > solution to allow me to do something like "git clone"

What I would use here is the "command=what-i-need-to-do-script"
feature of authorized_keys.  I forget whether this is in ssh(1) or
sshd(8), probably the former.

 > But after a bit more research, and thinking about the actual goal, I
 > rather like the rsync solution I ended up with.

"There's always more than one way to do it, and usually several ways
to do it *well*."

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links