{"thread":{"id":"48299","subject":"\"proper\" way to deactivate push for a remote?","startedAt":"2018-04-16T14:03:53Z","lastAt":"2018-04-16T18:25:16Z","messageCount":2,"participants":["Robert P. J. Day","Jacob Keller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"344791","messageId":"alpine.LFD.2.21.1804160659300.6118@localhost.localdomain","threadId":"48299","inReplyTo":null,"subject":"\"proper\" way to deactivate push for a remote?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-04-16T14:03:36Z","receivedAt":"2018-04-16T14:03:53Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n another feature i've seen for the very first time ... working with\nkubernetes so i checked it out of github, and part of the instructions\nfor that is to make sure you don't accidentally try to push back to\nthe github remote, so the directions suggest:\n\n$ git remote add upstream https://github.com/kubernetes/kubernetes.git\n$ git remote set-url --push upstream no_push\n\n  fair enough, i just assumed the word \"no_push\" was some magical\nkeyword in that context, but as i read it, all you need to do is put\n*some* invalid URL value there, is that correct?\n\n  and is that the accepted way to do that? what about just deleting\nthat line from .git/config? is that valid, or is there a different\nrecommendation for doing that? thanks.\n\nrday\n"},{"id":"344813","messageId":"CA+P7+xow0HSMJJn8DFgqhnU1ZLdrLPZy8Wv0tTLAE3ufQmpD_g@mail.gmail.com","threadId":"48299","inReplyTo":"alpine.LFD.2.21.1804160659300.6118@localhost.localdomain","subject":"Re: \"proper\" way to deactivate push for a remote?","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2018-04-16T18:24:49Z","receivedAt":"2018-04-16T18:25:16Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Mon, Apr 16, 2018 at 7:03 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n>  another feature i've seen for the very first time ... working with\n> kubernetes so i checked it out of github, and part of the instructions\n> for that is to make sure you don't accidentally try to push back to\n> the github remote, so the directions suggest:\n>\n> $ git remote add upstream https://github.com/kubernetes/kubernetes.git\n> $ git remote set-url --push upstream no_push\n>\n>   fair enough, i just assumed the word \"no_push\" was some magical\n> keyword in that context, but as i read it, all you need to do is put\n> *some* invalid URL value there, is that correct?\n>\n>   and is that the accepted way to do that? what about just deleting\n> that line from .git/config? is that valid, or is there a different\n> recommendation for doing that? thanks.\n>\n> rday\n\nI've done this in the past by using a push hook which just reports an\nerror. That's how I'd do it.\n\nI think if you also set the push url to the empty string it would also work.\n\nThanks,\nJake\n"}]}