git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Carnecky <tom@dbservice.com>
To: Tim Visher <tim.visher@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Different Fetch and Push URLs?
Date: Fri, 26 Feb 2010 16:18:56 +0100	[thread overview]
Message-ID: <4B87E660.7010401@dbservice.com> (raw)
In-Reply-To: <c115fd3c1002260701u11cf506fq747d7217d31eba59@mail.gmail.com>

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

  reply	other threads:[~2010-02-26 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 15:01 Different Fetch and Push URLs? Tim Visher
2010-02-26 15:18 ` Tomas Carnecky [this message]
2010-02-26 15:20 ` Jeff King
2010-02-26 15:32   ` Tim Visher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B87E660.7010401@dbservice.com \
    --to=tom@dbservice.com \
    --cc=git@vger.kernel.org \
    --cc=tim.visher@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).