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

Re: way to automatically add untracked files?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 6, 2007, 00:16 UTC
Message-ID
<Pine.LNX.4.64.0708060112330.14781@racer.site>
In-Reply-To
<200708052116.04140.johan@herland.net>
Hi,
On Sun, 5 Aug 2007, Johan Herland wrote:
Show 8 quoted lines
> On Sunday 05 August 2007, Theodore Tso wrote:
> > On Sun, Aug 05, 2007 at 02:11:24PM +0200, Johan Herland wrote:
> > > Adding a git-addremove command should not be much work, and it would be
> > > a lot friendlier to people whose workflow is more aligned with #2 than 
> > > #1. 
> > Not much work at all:
> > 
> > # git config --system --add alias.addremove "git add . ; git add -u"

Note that this will not work: you have to add an exclamation mark before "git add", because it has to execute two commands.

Note also that I do _not_ suggest using --system. This option forces you to run git as root on sane systems, which I think is wrong. Rather use "--global" to make it globally available to _you_.

> But I'm wondering whether we'd want to include it in git by default 
> (instead of having to tell confused users to add the alias).

I recommend against that, too. All too often, I have some temporary files in the working tree, and I'll be dimmed if I'm the only one. So "addremove" adds too much possibility for pilot errors.

My opinion here is not set in stone, though.  Maybe you can convince me.

Ciao, Dscho

Previous: Miles BaderNext: Miles Bader
Message 21 of 40 in “way to automatically add untracked files?”
  1. Miles BaderAug 5, 2007
  2. Shawn O. PearceAug 5, 2007
  3. Junio C HamanoAug 5, 2007
  4. Miles BaderAug 5, 2007
  5. Shawn O. PearceAug 5, 2007
  6. Miles BaderAug 5, 2007
  7. Junio C HamanoAug 5, 2007
  8. Miles BaderAug 5, 2007
  9. Junio C HamanoAug 5, 2007
  10. Miles BaderAug 5, 2007
  11. Junio C HamanoAug 5, 2007
  12. Miles BaderAug 5, 2007
  13. Johannes SchindelinAug 5, 2007
  14. Miles BaderAug 5, 2007
  15. Steffen ProhaskaAug 5, 2007
  16. Johan HerlandAug 5, 2007
  17. David KastrupAug 5, 2007
  18. Theodore TsoAug 5, 2007
  19. Johan HerlandAug 5, 2007
  20. Miles BaderAug 6, 2007
  21. Johannes SchindelinAug 6, 2007
  22. Miles BaderAug 6, 2007
  23. Johannes SchindelinAug 6, 2007
  24. Miles BaderAug 6, 2007
  25. Johan HerlandAug 6, 2007
  26. Johannes SchindelinAug 6, 2007
  27. Steffen ProhaskaAug 5, 2007
  28. Johannes SchindelinAug 6, 2007
  29. Steffen ProhaskaAug 6, 2007
  30. Jakub NarebskiAug 6, 2007
  31. Johan HerlandAug 6, 2007
  32. Junio C HamanoAug 6, 2007
  33. David KastrupAug 6, 2007
  34. Miles BaderAug 7, 2007
  35. Linus TorvaldsAug 5, 2007
  36. Junio C HamanoAug 5, 2007
  37. David KastrupAug 5, 2007
  38. Benchmarking git-add vs git-ls-files+update-index (was: way to automatically add untracked files?)David Kastrup, Aug 5, 2007
  39. Miles BaderAug 5, 2007
  40. Linus TorvaldsAug 5, 2007

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.