threads / discuss / 37314

push from one remote to another

Subject: push from one remote to another

## tl;dr

2 messages between Aug 8, 2014 and Aug 8, 2014.

replies: 1people: 2as markdown or json

Olaf Hering· Aug 8, 2014, 13:20 UTC · lore

What is the correct syntax/setup to push from one remote to another? I did something like this, to feed a github repo:

 # rm -rf $$
 # mkdir $$
 # cd $$
 # git --init
 # git remote add --tags t git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 # git remote add --tags o git@github.com:user/repo.git
 # git fetch --all
This syntax does not work for me:
 # git push t master o master
 # git push --tags t master o master

Is there a way to kind of mirror without doing a checkout, to save diskspace?

Olaf
Andreas Schwab· Aug 8, 2014, 13:48 UTC · re: Olaf Hering · lore

Re: push from one remote to another

Olaf Hering <olaf@aepfle.de> writes:
Show 14 quoted lines
> What is the correct syntax/setup to push from one remote to another?
> I did something like this, to feed a github repo:
>
>  # rm -rf $$
>  # mkdir $$
>  # cd $$
>  # git --init
>  # git remote add --tags t git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>  # git remote add --tags o git@github.com:user/repo.git
>  # git fetch --all
>
> This syntax does not work for me:
>  # git push t master o master
>  # git push --tags t master o master
$ git push o remotes/t/master:master
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

← back to recent threads