git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] git builtin "push"
Date: Sun, 30 Apr 2006 13:07:42 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604301303010.5231@g5.osdl.org> (raw)
In-Reply-To: <445516F5.1090204@garzik.org>



On Sun, 30 Apr 2006, Jeff Garzik wrote:

> Linus Torvalds wrote:
> > Now, the reason I did it as a built-in is partly because it's yet another
> > step on relying less on shell, but it's actually mostly because I've wanted
> > to be able to push to _multiple_ repositories, and the most obvious and
> > simplest interface for that would seem be to just have a "remotes" file that
> > has multiple URL entries.
> 
> Thanks!  This is why I still use rsync, even though everybody and their mother
> tells me "Linus says rsync is deprecated."

No. You're using rsync because you're actively doing something _wrong_.

> Fact is, rsync is still the best to push a _bunch_ of branches, in the same
> tree, all in one command.

Not so. My builtin thing doesn't help at all, because it doesn't _need_ to 
help that case. You can already push as many branches as you want with the 
old "git push".

My builtin thing helps push to multiple _repositories_, not to multiple 
branches. I push out my stuff to two separate repos at master.kernel.org, 
and one at an osdl.org server machine, because if I lose my tree, I want 
to be sure I have alternate backups.

> In an attempt to get away from rsync, I even tried putting multiple 
> git:// entries into .git/remotes/origin, then doing "git push" with no 
> args, without success.

That's not how it works, and not how it has ever worked.

The way it works is that

	"git push repo"

with no branch specs will update all branches that are IN COMMON between 
your tree and the repository you're pushing to. In other words, it's meant 
to sync up the branches that you have already pushed.

If you want to push other branches, you need to do

	git push repo branch1 branch2 branch3 ...

or

	git push --all repo

where the latter does exactly what it says (use "--tags" instead of 
"--all" to just send all tags).

In all cases you will find that it's a hell of a lot more efficient than 
rsync ever has been.

		Linus

  reply	other threads:[~2006-04-30 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-30  4:22 [PATCH] git builtin "push" Linus Torvalds
2006-04-30  7:08 ` Junio C Hamano
     [not found] ` <20060430054049.7856f24c.seanlkml@sympatico.ca>
2006-04-30  9:40   ` sean
2006-04-30 19:58 ` Jeff Garzik
2006-04-30 20:07   ` Linus Torvalds [this message]
     [not found]     ` <20060430165028.215d4fdf.seanlkml@sympatico.ca>
2006-04-30 20:50       ` sean
2006-04-30 21:05         ` Linus Torvalds
2006-04-30 21:47           ` Junio C Hamano
2006-04-30 21:30     ` Jeff Garzik

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=Pine.LNX.4.64.0604301303010.5231@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jeff@garzik.org \
    --cc=junkio@cox.net \
    /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).