Skip to content

Commit 8776f5d

Browse files
peffgitster
authored andcommitted
document "intent to add" option to git-add
This was added by 3942581 but never documented. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 310237b commit 8776f5d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Documentation/git-add.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
12-
[--all | [--update | -u]] [--refresh] [--ignore-errors] [--]
13-
<filepattern>...
12+
[--all | [--update | -u]] [--intent-to-add | -N]
13+
[--refresh] [--ignore-errors] [--] <filepattern>...
1414

1515
DESCRIPTION
1616
-----------
@@ -92,6 +92,15 @@ OPTIONS
9292
and add all untracked files that are not ignored by '.gitignore'
9393
mechanism.
9494

95+
96+
-N::
97+
--intent-to-add::
98+
Record only the fact that the path will be added later. An entry
99+
for the path is placed in the index with no content. This is
100+
useful for, among other things, showing the unstaged content of
101+
such files with 'git diff' and commiting them with 'git commit
102+
-a'.
103+
95104
--refresh::
96105
Don't add the file(s), but only refresh their stat()
97106
information in the index.

0 commit comments

Comments
 (0)