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

Re: RFE: git rm

From
Junio C Hamano <junkio@cox.net>
Date
Oct 24, 2005, 22:11 UTC
Message-ID
<7vr7aalg57.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0510241725370.25300@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> I often do "git add something" when I happen to think of it, not 
> necessarily right before committing, which means that I have these files 
> changed in my index while working. I may quit this, however, now that git 
> status lists the ones I missed.

Oh, I do 'git add' myself; otherwise I'd surely forget by the time I commit.

And I did not mean to tell you to quit doing it. If any of you took what I said as "Linus does not do it, I do not do it, so you should not be doing update-index in the middle", then that was not my intention and I apologize for causing confusion.

I think update-index in the middle is a valid workflow. The only drawback I can think of is that you cannot merge or apply others' patches once you do it until you commit. I was just curious how people use git, weighing the pros and cons of that (pros: git-diff-files is easier to read and the index gives you a good anchoring point; cons: you cannot do merge or patch application).

Show 5 quoted lines
> Incidentally, the new git status entry for --others really ought to say 
> something different from "Ignored files", like "Exist but not tracked", 
> since it doesn't include the contents of .gitignore, which you'd expect to 
> be "Ignored". (And, of course, any files it lists are hardly being 
> ignored.)
Good point.  Something like this?
 ------------
Clarify git status output.

What we list as "Ignored files" are not "ignored". Rather, it is the list of "not listed in the to-be-ignored files, but exists -- you may be forgetting to add them".

Pointed out by Daniel.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-status.sh b/git-status.sh
index 29c2b11..62a24a9 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -90,7 +90,7 @@ perl -e '$/ = "\0";
 		s|\n|\\n|g;
 		s/^/#	/;
 		if (!$shown) {
-			print "#\n# Ignored files:\n";
+			print "#\n# Untracked files:\n";
 			print "#   (use \"git add\" to add to commit)\n#\n";
 			$shown = 1;
 		}
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 5 of 6 in “RFE: git rm”
  1. Jeff GarzikOct 24, 2005
  2. H. Peter AnvinOct 24, 2005
  3. Junio C HamanoOct 24, 2005
  4. Daniel BarkalowOct 24, 2005
  5. Junio C HamanoOct 24, 2005
  6. Daniel BarkalowOct 24, 2005

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.