summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-09 18:38:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-12-09 18:38:16 (GMT)
commit4b5f94cdde41a58ac893c0bfb3e04f235e53f9dc (patch)
tree753b908286360b4f0f7c7e3af560cfb601c9b905 /Documentation
parent6aa6a92fb61f0ba295b349222b8966c46ef0ba58 (diff)
parent6f02a5a33a3983597992e94c7b826021acc8a9d9 (diff)
downloadgit-4b5f94cdde41a58ac893c0bfb3e04f235e53f9dc.zip
git-4b5f94cdde41a58ac893c0bfb3e04f235e53f9dc.tar.gz
git-4b5f94cdde41a58ac893c0bfb3e04f235e53f9dc.tar.bz2
Merge branch 'jn/ignore-doc' into maint
* jn/ignore-doc: Documentation: point to related commands from gitignore Documentation: split gitignore page into sections
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitignore.txt30
1 files changed, 23 insertions, 7 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 7dc2e8b..8416f34 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -14,11 +14,8 @@ DESCRIPTION
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'
-documentation.
+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
@@ -62,7 +59,8 @@ files specified by command-line options. Higher-level git
tools, such as 'git status' and 'git add',
use patterns from the sources specified above.
-Patterns have the following format:
+PATTERN FORMAT
+--------------
- A blank line matches no files, so it can serve as a separator
for readability.
@@ -98,7 +96,20 @@ Patterns have the following format:
For example, "/{asterisk}.c" matches "cat-file.c" but not
"mozilla-sha1/sha1.c".
-An example:
+NOTES
+-----
+
+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'.
+
+EXAMPLES
+--------
--------------------------------------------------------------
$ git status
@@ -140,6 +151,11 @@ Another example:
The second .gitignore prevents git from ignoring
`arch/foo/kernel/vmlinux.lds.S`.
+SEE ALSO
+--------
+linkgit:git-rm[1], linkgit:git-update-index[1],
+linkgit:gitrepository-layout[5]
+
Documentation
-------------
Documentation by David Greaves, Junio C Hamano, Josh Triplett,