Skip to content

Commit

Permalink
Documentation about exclude/ignore files
Browse files Browse the repository at this point in the history
Use .git/info/exclude in the example in git-ls-files.txt,
instead of .git/ignore, and update the list of commands looking
at .git/info/exclude in repository-layout.txt.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Matthias Lederhofer authored and Junio C Hamano committed Jul 14, 2006
1 parent a526276 commit ff4d780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-ls-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ An exclude pattern is of the following format:
An example:

--------------------------------------------------------------
$ cat .git/ignore
$ cat .git/info/exclude
# ignore objects and archives, anywhere in the tree.
*.[oa]
$ cat Documentation/.gitignore
Expand All @@ -217,7 +217,7 @@ An example:
!foo.html
$ git-ls-files --ignored \
--exclude='Documentation/*.[0-9]' \
--exclude-from=.git/ignore \
--exclude-from=.git/info/exclude \
--exclude-per-directory=.gitignore
--------------------------------------------------------------

Expand Down
8 changes: 5 additions & 3 deletions Documentation/repository-layout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ info/grafts::

info/exclude::
This file, by convention among Porcelains, stores the
exclude pattern list. `git status` looks at it, but
otherwise it is not looked at by any of the core git
commands.
exclude pattern list. `.gitignore` is the per-directory
ignore file. `git status`, `git add`, `git rm` and `git
clean` look at it but the core git commands do not look
at it. See also: gitlink:git-ls-files[1] `--exclude-from`
and `--exclude-per-directory`.

remotes::
Stores shorthands to be used to give URL and default
Expand Down

0 comments on commit ff4d780

Please sign in to comment.