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

Re: How to ignore changes on remote

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:29

Scott Chacon [off-list ref] writes:
Why would we teach someone to do that instead of just recommending the
far less obscure 'git push -f'?  A leading '+' on the refspec is
ridiculously confusing compared to "just tell it to force the push
with -f".  Am I forgetting something?
I think "-f" would be simpler and easier for people who use only one
branch, as there is no "I want to disable only for this branch but still
want other branches checked" problem in such a case.

Once they graduate from that and start using more than one branches, "-f"
is too broad a brush that disables the check for everything you push out,
and you would want to teach "+" as a way to narrow the possible damage.

"git push -f origin this_branch_only" can be used to limit the risk, but
if they start from a short-and-lazy "git push -f" without arguments, their
finger would have harder time to learn it.  There is no such learning
curve issue for "+", as you cannot use it without saying for which branch
to disable the check.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help