Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Documentation/git-push.txt: explain better cases where --force is dangerous

From: Marc Branchaud <hidden>
Date: 2016-06-15 22:57:47

On 13-06-17 01:52 PM, Matthieu Moy wrote:
quoted hunk ↗ jump to hunk
The behavior of "git push --force" is rather clear when it updates only
one remote ref, but running it when pushing several branches can really
be dangerous. Warn the users a bit more and give them the alternative to
push only one branch.

Signed-off-by: Matthieu Moy <redacted>
---
  Documentation/git-push.txt | 8 ++++++++
  1 file changed, 8 insertions(+)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 938d1ee..9b9e7d1 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -136,6 +136,14 @@ 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 destination configured may override refs other
s/destination/destinations/

		M.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help