Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:07

Junio C Hamano [off-list ref] writes:
quoted
+Note the addition of the `+` sign.  Alternatively, you can use the
+`-f` flag to force the remote update, as in:
+
+-------------------------------------------------
+$ git push -f ssh://yourserver.com/~you/proj.git master
+-------------------------------------------------
+
I didn't check the surrounding examples but would it make it a bit
too advanced to make the example flow push out more than one
branches here (perhaps he is also updating the 'maint' branch)?
Then use of "--force" can be explained as "Instead of adding + to
each and every refs to be pushed, you can use a single -f to force
everything."
Now I have.  This is after a "git push" failed, saying that 'master'
does not fast forward, and attempting to push the 'master' out
forcibly.  There is little risk the user would get confused and say
"push -f $there master some-other-branch" in the context of this
flow.

So I think the patch is good, but others may have comments, so I'll
let the patch floating on the list for now.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help