#20953: git push -f in docs needs a stern warning -------------------------------+-------------------- Reporter: EvilDMP | Owner: nobody Type: Uncategorized | Status: new Component: Documentation | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- https://docs.djangoproject.com/en/dev/internals/contributing/writing-code /working-with-git/#rebasing-branches:
{{{ git push -f origin ticket_xxxxx }}} This should be accompanied by a note saying something like: '''Never''' use `push -f` without specifying a remote, otherwise you may be force-pushing changes to one or more unexpected remotes without even realising it. If you force-push to the wrong remote, you ''will'' be sorry. Ways of avoiding accidents with `push -f` include: * thinking twice and three times before using `push -f` * never using `push -f`, and instead: * deleting the branch on GitHub and pushing again, or: * creating a new local branch with `git checkout -b <new-branch-name> and pushing that * using a password (Git with HTTPS) rather than your key (Git with SSH) for your remotes' URLs (perhaps there are some more elegant solutions). -- Ticket URL: <https://code.djangoproject.com/ticket/20953> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.33384c38dab669e1f691be191cdc2dcb%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.