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
threads / discuss / 29118
configure git to not push all remote tracking branches
Subject: configure git to not push all remote tracking branches
Re: configure git to not push all remote tracking branches
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
Re: configure git to not push all remote tracking branches
On Fri, Dec 9, 2011 at 10:03 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 14 quoted lines
> 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