Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Different Fetch and Push URLs?

From: Tomas Carnecky <hidden>
Date: 2016-06-15 22:48:21

On 2/26/10 4:01 PM, Tim Visher wrote:
Hello Everyone,

My work situation leaves me in a situation where I can clone from my
central repo but I can't push there.  Is it possible and does it make
any sense to have a single remote with one URL that I pull from and
another than I push to?  I only ask because I was looking at the
output of `git remote show` and noticed that there are 2 URLs.  If it
is possible, how do I do it?  I looked in `.git/config` and there's
only 1 URL there.

I am aware that I could have 2 remotes and simply consciously remember
to only push to the one that I have access to.  This is what I usually
do but the scenario I describe above seems nicer to me.
git config remote.origin.pushurl <your push url>

(see the git-config(1) man page for more details)

tom
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help