@@ -464,19 +464,23 @@ <h2 id="_synopsis">SYNOPSIS</h2>
464464< h2 id ="_description "> DESCRIPTION</ h2 >
465465< div class ="sectionbody ">
466466< div class ="paragraph ">
467- < p > This command updates the index using the current content found in
468- the working tree, to prepare the content staged for the next commit.
469- It typically adds the current content of existing paths as a whole,
470- but with some options it can also be used to add content with
471- only part of the changes made to the working tree files applied, or
472- remove paths that do not exist in the working tree anymore.</ p >
467+ < p > Add contents of new or changed files to the index. The "index" (also
468+ known as the "staging area") is what you use to prepare the contents of
469+ the next commit.</ p >
473470</ div >
474471< div class ="paragraph ">
475- < p > The "index" holds a snapshot of the content of the working tree, and it
476- is this snapshot that is taken as the contents of the next commit. Thus
477- after making any changes to the working tree, and before running
478- the commit command, you must use the < code > add</ code > command to add any new or
479- modified files to the index.</ p >
472+ < p > When you run < code > git</ code > < code > commit</ code > without any other arguments, it will only
473+ commit staged changes. For example, if you’ve edited < code > file.c</ code > and want
474+ to commit your changes to that file, you can run:</ p >
475+ </ div >
476+ < div class ="literalblock ">
477+ < div class ="content ">
478+ < pre > git add file.c
479+ git commit</ pre >
480+ </ div >
481+ </ div >
482+ < div class ="paragraph ">
483+ < p > You can also add only part of your changes to a file with < code > git</ code > < code > add</ code > < code > -p</ code > .</ p >
480484</ div >
481485< div class ="paragraph ">
482486< p > This command can be performed multiple times before a commit. It only
@@ -489,12 +493,10 @@ <h2 id="_description">DESCRIPTION</h2>
489493files have changes that are staged for the next commit.</ p >
490494</ div >
491495< div class ="paragraph ">
492- < p > The < code > git</ code > < code > add</ code > command will not add ignored files by default. If any
493- ignored files were explicitly specified on the command line, < code > git</ code > < code > add</ code >
494- will fail with a list of ignored files. Ignored files reached by
495- directory recursion or filename globbing performed by Git (quote your
496- globs before the shell) will be silently ignored. The < code > git</ code > < code > add</ code > command can
497- be used to add ignored files with the < code > -f</ code > (force) option.</ p >
496+ < p > The < code > git</ code > < code > add</ code > command will not add ignored files by default. You can
497+ use the < code > --force</ code > option to add ignored files. If you specify the exact
498+ filename of an ignored file, < code > git</ code > < code > add</ code > will fail with a list of ignored
499+ files. Otherwise it will silently ignore the file.</ p >
498500</ div >
499501< div class ="paragraph ">
500502< p > Please see < a href ="git-commit.html "> git-commit(1)</ a > for alternative ways to add content to a
@@ -1043,7 +1045,7 @@ <h2 id="_git">GIT</h2>
10431045</ div >
10441046< div id ="footer ">
10451047< div id ="footer-text ">
1046- Last updated 2025-08-04 09:35:46 -0700
1048+ Last updated 2025-09-12 12:13:52 -0700
10471049</ div >
10481050</ div >
10491051</ body >
0 commit comments