Closed certik closed 10 years ago
is the same true of
git config remote.origin.fetchurl ?
The same is not true, according to a quick grep of the git sources. However, there is no need for such an option as both url
and pushurl
can be defined at the same time, and fetch will use url
and push will use pushurl
Also note, the proper way to set a pushurl is with git remote set-url --push ssh://user@host/path/to/repo.git
how is that different than git config remote.origin.pushurl ssh://user@host/path/to/repo.git
?
It is not functionally different, as set-url internally ends up just calling config. But set-url will complain if you mistype the command part "git remote set-url --push", whereas git config will silently accept mistyped options, but fail to actually set the remote's url.
Additionally, it is possible that set-url with, in the future, do some sanity checking on the value entered, whereas config will never do that.
I know it has been a long while (7 months) since the last discussion in here. However, having just taken this repo over I'd be so glad to see a contribution of a Pull Request that added the distillate from this discussion about git remote set-url
and its sanity checking for updating the URL. I'd gladly merge it in and give it polish. Let me know if you are up for creating a Pull Request @tbone47.
Anyone still on this? Would be up for giving it a crack if nobody minds.
@randomecho I know some folks are out of the holidays, but if you don't hear back from folks in a day or so, I'd say, please, please attack it. We'd be delighted!
Many times, you clone a repo using
git clone git://github.com/certik/jsplot.git
and you'd like to push in using:
git push origin master
you can do that by:
git config remote.origin.pushurl git@github.com:certik/jsplot.git
it'd be cool to have this trick in the remotes section