DEV Community

Arnaldo Gabriel
Arnaldo Gabriel

Posted on

12 4

One-liner to prevent accidental pushes to public repositories

Note to self

One-liner to disable remote pushing. Useful to prevent accidental pushes to public repositories.

git remote set-url --push origin no_push

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more