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

Re: Hey - A Conceptual Simplication....

From
Jan Krüger <jk@jk.gs>
Date
Nov 18, 2009, 13:25 UTC
Message-ID
<20091118142512.1313744e@perceptron>
In-Reply-To
<005a01ca684e$71a1d710$54e58530$@com>
Hi,
Show 7 quoted lines
> The result is conceptual complexity and rather counter-intuitive
> behavior. For example, adding and renaming files outside of Git is
> not considered editing the version until you subsequently do a "Git
> Add ." Contrast that with editing or deleting files outside of Git.
> Yet adding and renaming files and folders is a significant part of
> substantive projects, especially in the early stages and experimental
> branches.

yet even now, people routinely add huge amounts of files they didn't actually want to add, and then have to expend a huge amount of effort to get them out of the history again (particularly if that history has already been published).

What you are describing is a workflow that is even fuller of potential for wrong turns than the current standard workflow is. If simplicity leads to a greater potential for errors, how is it a good thing?

This kind of workflow actually involves more work for the user. She now has to meticulously maintain an accurate list of ignore patterns, particularly because of this:

> Also can we augment checkout to totally CLEAN the working directory
> prior to a restore. If necessary we can augment .gitignore to
> stipulate those files or folders that should be excluded from the
> cleaning.
So if I forget to add a certain pattern, my file is lost forever? Uhh...
> This suggestion is in recognition of the fact that if you
> are not versioning the file, it is typically trash

Just how typical is that, though? I wouldn't want to be the one to judge that.

In light of my concerns, I oppose adding your suggestions to the official CLI of git and I suggest that you create your own commands to enable this kind of workflow. For example:

git config --global alias.commitx '!git add . && git commit' git config --global alias.checkoutx '!git clean && git checkout'

Jan
Previous: Jonathan del StrotherNext: George Dennie
Message 3 of 25 in “Hey - A Conceptual Simplication....”
  1. George DennieNov 18, 2009
  2. Jonathan del StrotherNov 18, 2009
  3. Jan KrügerNov 18, 2009
  4. George DennieNov 18, 2009
  5. Jakub NarebskiNov 18, 2009
  6. Jason SewallNov 18, 2009
  7. George DennieNov 19, 2009
  8. Björn SteinbrinkNov 19, 2009
  9. George DennieNov 19, 2009
  10. Junio C HamanoNov 19, 2009
  11. Jakub NarebskiNov 20, 2009
  12. Junio C HamanoNov 20, 2009
  13. Dmitry PotapovNov 20, 2009
  14. Jakub NarebskiNov 19, 2009
  15. Dmitry PotapovNov 20, 2009
  16. david@lang.hmNov 20, 2009
  17. Dmitry PotapovNov 20, 2009
  18. Björn SteinbrinkNov 20, 2009
  19. Dmitry PotapovNov 20, 2009
  20. Dmitry PotapovNov 20, 2009
  21. Junio C HamanoNov 20, 2009
  22. Dmitry PotapovNov 20, 2009
  23. Thomas RastNov 18, 2009
  24. Jason SewallNov 18, 2009
  25. Linus TorvaldsNov 18, 2009

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.