Junio C Hamano  committed 4b5f94c Merge

Merge branch 'jn/ignore-doc' into maint

* jn/ignore-doc:
Documentation: point to related commands from gitignore
Documentation: split gitignore page into sections

  • Participants
  • Parent commits 6aa6a92, 6f02a5a

Comments (0)

Files changed (1)

File Documentation/gitignore.txt

 A `gitignore` file specifies intentionally untracked files that
 git should ignore.
-Note that all the `gitignore` files really concern only files
-that are not already tracked by git;
-in order to ignore uncommitted changes in already tracked files,
-please refer to the 'git update-index --assume-unchanged'
+Files already tracked by git are not affected; see the NOTES
+below for details.
 Each line in a `gitignore` file specifies a pattern.
 When deciding whether to ignore a path, git normally checks
 tools, such as 'git status' and 'git add',
 use patterns from the sources specified above.
-Patterns have the following format:
  - A blank line matches no files, so it can serve as a separator
    for readability.
    For example, "/{asterisk}.c" matches "cat-file.c" but not
-An example:
+The purpose of gitignore files is to ensure that certain files
+not tracked by git remain untracked.
+To ignore uncommitted changes in a file that is already tracked,
+use 'git update-index {litdd}assume-unchanged'.
+To stop tracking a file that is currently tracked, use
+'git rm --cached'.
     $ git status
 The second .gitignore prevents git from ignoring
+linkgit:git-rm[1], linkgit:git-update-index[1],
 Documentation by David Greaves, Junio C Hamano, Josh Triplett,