aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitignore.txt
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2008-07-18 16:11:07 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-19 11:17:43 -0700
commit6259ac6628477aa5ebde9bd9e8daaeecca2a74ae (patch)
tree3d0480c01add01bf5fe8be392ec8a52a2eb075c8 /Documentation/gitignore.txt
parentc47f10246ac6413ac6902bd70e45492174fac873 (diff)
downloadgit-6259ac6628477aa5ebde9bd9e8daaeecca2a74ae.tar.gz
Documentation: How to ignore local changes in tracked files
This patch explains more carefully that `.gitignore` concerns only untracked files and refers the reader to git update-index --assume-unchanged in the need of ignoring uncommitted changes in already tracked files. The description of this option is lifted to a more "porcelainish" level and explains the caveats of this usecase. Whether feasible or not, I believe adding this functionality to the porcelain is out of the scope of this patch. (And I personally think that referring to the plumbing in the case of such a special usage is fine.) This is currently probably one of the top FAQs at #git and the --assume-unchanged switch is not widely known; gitignore(5) is the first place where people are likely to look for it. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitignore.txt')
-rw-r--r--Documentation/gitignore.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index fc0efd8ec8..59321a2e82 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -13,9 +13,14 @@ DESCRIPTION
-----------
A `gitignore` file specifies intentionally untracked files that
-git should ignore. Each line in a `gitignore` file specifies a
-pattern.
-
+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.
+
+Each line in a `gitignore` file specifies a pattern.
When deciding whether to ignore a path, git normally checks
`gitignore` patterns from multiple sources, with the following
order of precedence, from highest to lowest (within one level of