]> git.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'mm/push-force-is-dangerous'
authorJunio C Hamano <gitster@pobox.com>
Wed, 26 Jun 2013 22:07:38 +0000 (15:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Jun 2013 22:07:38 +0000 (15:07 -0700)
* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous

Documentation/git-push.txt

index df5be268ba69f34fe5e91c3148f8af8c1e0091d6..f7dfe48d2813324e1a699efa530afe8974d7c400 100644 (file)
@@ -136,6 +136,15 @@ already exists on the remote side.
        not an ancestor of the local ref used to overwrite it.
        This flag disables the check.  This can cause the
        remote repository to lose commits; use it with care.
+       Note that `--force` applies to all the refs that are pushed,
+       hence using it with `push.default` set to `matching` or with
+       multiple push destinations configured with `remote.*.push`
+       may overwrite refs other than the current branch (including
+       local refs that are strictly behind their remote counterpart).
+       To force a push to only one branch, use a `+` in front of the
+       refspec to push (e.g `git push origin +master` to force a push
+       to the `master` branch). See the `<refspec>...` section above
+       for details.
 
 --repo=<repository>::
        This option is only relevant if no <repository> argument is