git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to ignore changes on remote

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2010, 16:44 UTC
Message-ID
<7vtys72dj8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<d411cc4a1003230905y12839743x400333a0aa2e7018@mail.gmail.com>
Scott Chacon <schacon@gmail.com> 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.

Previous: Johan Herland
Message 14 of 14 in “How to ignore changes on remote”
  1. Howard MillerMar 23, 2010
  2. Sylvain RabotMar 23, 2010
  3. Howard MillerMar 23, 2010
  4. Alexander IljinMar 23, 2010
  5. Santi BéjarMar 23, 2010
  6. Howard MillerMar 23, 2010
  7. Sylvain RabotMar 23, 2010
  8. Scott ChaconMar 23, 2010
  9. Howard MillerMar 23, 2010
  10. Johannes SixtMar 23, 2010
  11. Johan HerlandMar 23, 2010
  12. Jakub NarebskiMar 23, 2010
  13. Johan HerlandMar 23, 2010
  14. Junio C HamanoMar 23, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.