summaryrefslogtreecommitdiff
path: root/Documentation/git-push.txt
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-26 15:07:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-26 15:07:38 -0700
commit14c6ee99aeefe4420afeb89b725e05dde806ec60 (patch)
tree8f035f4a64e61bb9ce896bb7ef8c53c2d5e25265 /Documentation/git-push.txt
parentMerge branch 'fg/submodule-non-ascii-path' (diff)
parentDocumentation/git-push.txt: explain better cases where --force is dangerous (diff)
downloadtgif-14c6ee99aeefe4420afeb89b725e05dde806ec60.tar.xz
Merge branch 'mm/push-force-is-dangerous'
* mm/push-force-is-dangerous: Documentation/git-push.txt: explain better cases where --force is dangerous
Diffstat (limited to 'Documentation/git-push.txt')
-rw-r--r--Documentation/git-push.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index df5be268ba..f7dfe48d28 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -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