git@vger.kernel.org mailing list mirror (one of many)
 help / 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, back to index

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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox