git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Bill Lear <rael@zopyra.com>
Cc: Joseph Wakeling <joseph.wakeling@webdrake.net>, git@vger.kernel.org
Subject: Re: Newbie experience with push over ssh
Date: Thu, 15 Feb 2007 16:35:29 +0100	[thread overview]
Message-ID: <45D47DC1.6020401@op5.se> (raw)
In-Reply-To: <17875.14305.910866.273778@lisa.zopyra.com>

Bill Lear wrote:
> On Wednesday, February 14, 2007 at 16:10:45 (+0000) Joseph Wakeling writes:
>> Matthias Lederhofer wrote:
>>> I don't think there is any way to 'clone to remote'.  You'd have to
>>> ssh to the other machine and clone from there, or you can just create
>>> an empty repository on the remote host and push the stuff into it.
>> I remember coming across the same issue as Matthieu and never got round
>> to solving it.  In my case the desire is to upload the code onto a
>> remote machine---in particular a cluster where I run simulations.  I
>> don't particularly need that remote code to be in a repo or otherwise,
>> since it's only there to be run, not edited.
>>
>> As far as I know I have no way of installing git on that machine.
>> Perhaps I could install it locally but I suspect the sysadmin would not
>> be supportive.
>>
>> So, is there a way of using git to upload my code to a machine without a
>> repo ready-prepared?
> 
> If you must ...
> 
> % cat ~/.gitconfig
> [alias]
> 	scp !scp
> 	rcp !rcp
> % git scp -rp . me@remotehost:/directory
>

:-)

Perhaps a better solution would be to do

git archive --format=tar --prefix=project/ | bzip2 -f9 | \
	ssh user@remote -C "cat > project.tar.bz2"

Then unpack and build as usual on the remote end. Works a treat and is
currently the gist of the only line in my "push-to-web" script (the rest
of it just extends the command to run to also unpack the tarball).

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  parent reply	other threads:[~2007-02-15 15:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 14:07 Newbie experience with push over ssh Matthieu Moy
2007-02-14 14:27 ` Matthias Lederhofer
2007-02-14 16:10   ` Joseph Wakeling
2007-02-14 16:25     ` Bill Lear
2007-02-14 16:29       ` Joseph Wakeling
2007-02-14 16:34       ` Bill Lear
2007-02-14 16:48         ` Joseph Wakeling
2007-02-14 16:54           ` Bill Lear
2007-02-14 16:56           ` Matthieu Moy
2007-02-14 17:04             ` Joseph Wakeling
2007-02-14 17:38               ` Nicolas Pitre
2007-02-14 17:47                 ` Joseph Wakeling
2007-02-14 17:51                   ` Jeff King
2007-02-14 18:03                   ` Nicolas Pitre
2007-02-14 16:47       ` Matthieu Moy
2007-02-15 15:35       ` Andreas Ericsson [this message]
2007-02-14 17:52     ` Matthias Lederhofer
2007-02-14 18:00       ` Joseph Wakeling

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=45D47DC1.6020401@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=joseph.wakeling@webdrake.net \
    --cc=rael@zopyra.com \
    /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).