DEV Community

Cover image for 1 line to prevent pushing to someone else's git repository
Nočnica Mellifera for RudderStack

Posted on

5 2

1 line to prevent pushing to someone else's git repository

cover image by D.D. Fire

The other day I attempted to push to a public repository for about the hundredth time. This time I finally thought to search for a way to prevent this happening, and of course I found the answer on stack overflow

The following command will let pulls work, but pushes will try to use the URL no_push and fail:

git remote set-url --push origin no_push
Enter fullscreen mode Exit fullscreen mode

use it in good health!

Top comments (1)

Collapse
 
thtmnisamnstr profile image
Gavin

NGL I’m going to use this.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more