git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* "proper" way to deactivate push for a remote?
@ 2018-04-16 14:03 Robert P. J. Day
  2018-04-16 18:24 ` Jacob Keller
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2018-04-16 14:03 UTC (permalink / raw)
  To: Git Mailing list


 another feature i've seen for the very first time ... working with
kubernetes so i checked it out of github, and part of the instructions
for that is to make sure you don't accidentally try to push back to
the github remote, so the directions suggest:

$ git remote add upstream https://github.com/kubernetes/kubernetes.git
$ git remote set-url --push upstream no_push

  fair enough, i just assumed the word "no_push" was some magical
keyword in that context, but as i read it, all you need to do is put
*some* invalid URL value there, is that correct?

  and is that the accepted way to do that? what about just deleting
that line from .git/config? is that valid, or is there a different
recommendation for doing that? thanks.

rday

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: "proper" way to deactivate push for a remote?
  2018-04-16 14:03 "proper" way to deactivate push for a remote? Robert P. J. Day
@ 2018-04-16 18:24 ` Jacob Keller
  0 siblings, 0 replies; 2+ messages in thread
From: Jacob Keller @ 2018-04-16 18:24 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list

On Mon, Apr 16, 2018 at 7:03 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>  another feature i've seen for the very first time ... working with
> kubernetes so i checked it out of github, and part of the instructions
> for that is to make sure you don't accidentally try to push back to
> the github remote, so the directions suggest:
>
> $ git remote add upstream https://github.com/kubernetes/kubernetes.git
> $ git remote set-url --push upstream no_push
>
>   fair enough, i just assumed the word "no_push" was some magical
> keyword in that context, but as i read it, all you need to do is put
> *some* invalid URL value there, is that correct?
>
>   and is that the accepted way to do that? what about just deleting
> that line from .git/config? is that valid, or is there a different
> recommendation for doing that? thanks.
>
> rday

I've done this in the past by using a push hook which just reports an
error. That's how I'd do it.

I think if you also set the push url to the empty string it would also work.

Thanks,
Jake

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-16 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 14:03 "proper" way to deactivate push for a remote? Robert P. J. Day
2018-04-16 18:24 ` Jacob Keller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).