Re: [PATCH] git builtin "push"

From: Linus Torvalds <>
Date: 2006-05-01 06:07:42
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, 
and one at an 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 ...


	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.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Mon May 01 06:08:46 2006

This archive was generated by hypermail 2.1.8 : 2006-05-01 06:09:04 EST