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

Re: why is git destructive by default? (i suggest it not be!)

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jun 25, 2008, 12:20 UTC
Message-ID
<vpqtzfhr9i3.fsf@bauges.imag.fr>
In-Reply-To
<willow-jeske-01l5xqJDFEDjCftd>
"David Jeske" <jeske@google.com> writes:
> - standardize all the potentially destructive operations (after gc) on "-f /
> --force" to override

Depending on the definition of "potentially destructive", most commands are "potentially destructive".

git pull loses the point where the branch used to point when the reflog expires.

git add loses the old content of the index.
...

And adding too many --force options removes its real value. Many people type "rm -fr" any time they just want "rm", just because they were annoyed by the multiple interactive confirmations of plain "rm" (if aliased to "rm -i"). Asking people to type --force all the time make one fingers type --force mechanically, and removes all its value.

-- 
Matthieu
Previous: Brandon CaseyNext: Jing Xue
Message 7 of 8 in “Re: why is git destructive by default? (i suggest it not be!)”
  1. David JeskeJun 24, 2008
  2. David JeskeAug 14, 2016
  3. Brandon CaseyJun 24, 2008
  4. David JeskeJun 24, 2008
  5. David JeskeAug 14, 2016
  6. Brandon CaseyJun 24, 2008
  7. Matthieu MoyJun 25, 2008
  8. Jing XueJun 25, 2008

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.