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

[PATCH 1/2] document "intent to add" option to git-add

From
Jeff King <peff@peff.net>
Date
Oct 21, 2008, 00:36 UTC
Message-ID
<20081021003625.GA32569@coredump.intra.peff.net>
This was added by 3942581 but never documented.
Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/git-add.txt |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 2b6d6c8..6fc20b0 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -9,8 +9,8 @@ SYNOPSIS
 --------
 [verse]
 'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
-	  [--all | [--update | -u]] [--refresh] [--ignore-errors] [--]
-	  <filepattern>...
+	  [--all | [--update | -u]] [--intent-to-add | -N]
+	  [--refresh] [--ignore-errors] [--] <filepattern>...
 
 DESCRIPTION
 -----------
@@ -92,6 +92,15 @@ OPTIONS
 	and add all untracked files that are not ignored by '.gitignore'
 	mechanism.
 
+
+-N::
+--intent-to-add::
+	Record only the fact that the path will be added later. An entry
+	for the path is placed in the index with no content. This is
+	useful for, among other things, showing the unstaged content of
+	such files with 'git diff' and commiting them with 'git commit
+	-a'.
+
 --refresh::
 	Don't add the file(s), but only refresh their stat()
 	information in the index.
-- 
1.6.0.2.770.gb4241.dirty
Message 1 of 1 in “document "intent to add" option to git-add”
  1. 1/2 document "intent to add" option to git-addJeff King, Oct 21, 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.