# configure git to not push all remote tracking branches

3 messages from 2011-12-09 to 2011-12-09. Participants: Justin Johnson, Ramkumar Ramachandra.
Thread: https://gitlist.dev/t/29118

## Justin Johnson, 2011-12-09 15:00

Subject: configure git to not push all remote tracking branches
Message-ID: <CAPD5EOjsu-9=CCUJut_bGqv=asp8FeGqL2GhKewgw3SQsArk_A@mail.gmail.com>
URL: https://gitlist.dev/e/CAPD5EOjsu-9%3DCCUJut_bGqv%3Dasp8FeGqL2GhKewgw3SQsArk_A%40mail.gmail.com

```
Hi, I'm looking for some help with pushing to remote repositories.
I accidentally left out the refspec from my git push command and git
pushed all branches that are set up to track the remote repo that I
specified. I would like to disable this, and enforce specifying a
refspec. Is there a way to do this?
e.g.
git push alternateorigin
should not do anything, but
git push alternateorigin mybranch
should push just mybranch.
--
Justin Johnson

```

## Ramkumar Ramachandra, 2011-12-09 15:03

Subject: Re: configure git to not push all remote tracking branches
Message-ID: <CALkWK0m0f-AGLwKqiKx9Aozwr5oN6FrH5ehG03mmEpB7Di8PWQ@mail.gmail.com>
URL: https://gitlist.dev/e/CALkWK0m0f-AGLwKqiKx9Aozwr5oN6FrH5ehG03mmEpB7Di8PWQ%40mail.gmail.com
In-Reply-To: <CAPD5EOjsu-9=CCUJut_bGqv=asp8FeGqL2GhKewgw3SQsArk_A@mail.gmail.com>

```
Hi Justin,

Justin Johnson wrote:
> git push alternateorigin
> should not do anything, but
> git push alternateorigin mybranch
> should push just mybranch.

$ git config push.default nothing
Note: push.default defaults to "matching"

Cheers.

-- Ram

```

## Justin Johnson, 2011-12-09 15:07

Subject: Re: configure git to not push all remote tracking branches
Message-ID: <CAPD5EOgeKpV1bWJZmdUR6ZQuA=objSAApVrz1W9W8C_ij+XN9A@mail.gmail.com>
URL: https://gitlist.dev/e/CAPD5EOgeKpV1bWJZmdUR6ZQuA%3DobjSAApVrz1W9W8C_ij%2BXN9A%40mail.gmail.com
In-Reply-To: <CALkWK0m0f-AGLwKqiKx9Aozwr5oN6FrH5ehG03mmEpB7Di8PWQ@mail.gmail.com>

```
On Fri, Dec 9, 2011 at 10:03 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> Hi Justin,
>
> Justin Johnson wrote:
>> git push alternateorigin
>> should not do anything, but
>> git push alternateorigin mybranch
>> should push just mybranch.
>
> $ git config push.default nothing
> Note: push.default defaults to "matching"
>
> Cheers.
>
> -- Ram

Thank you, that's exactly it. I saw it in the docs for git-config but
wasn't positive that's what I needed.

--Justin

```
