Re: pushing remote branches
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:43
Lorenzo Bettini [off-list ref] writes:
quoted
Anyway to answer your question, I do not see the refspec line as the issue here, but the URL for the repo, which determines how you access it.so this would have been enough:quoted
quoted
[remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git://... [branch "master"] remote = origin merge = refs/heads/master [branch "experiments"] remote = origin merge = refs/heads/experiments
Because "git://" is almost always read-only, you wouldn't be able to push
back to the origin with that configuration. If you are only following the
project that is perfectly fine.
Otherwise, either use "git@..." in remote.origin.url to use git-over-ssh
in both directions, or you can use pushurl if you have recent enough
version of git, like:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://...
pushurl = git@...
When you primed your repository with "git clone git://...", it would be
nice if "clone" added a "corresponding" pushurl for you. But ... part of
the two lines are often different, depending on how hosting site is
organized, so unfortunately "clone" cannot do so.