Skip to content

Commit 8618098

Browse files
committed
Update gitattributes docs
1 parent 29974b4 commit 8618098

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

README

+3-7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Specify files to encrypt by creating a .gitattributes file:
3030

3131
secretfile filter=git-crypt diff=git-crypt
3232
*.key filter=git-crypt diff=git-crypt
33+
secretdir/** filter=git-crypt diff=git-crypt
3334

3435
Like a .gitignore file, it can match wildcards and should be checked into
3536
the repository. See below for more information about .gitattributes.
@@ -148,14 +149,9 @@ specifying merely a directory (e.g. `/dir/`) is NOT sufficient to
148149
encrypt all files beneath it.
149150

150151
Also note that the pattern `dir/*` does not match files under
151-
sub-directories of dir/. To encrypt an entire sub-tree dir/, place the
152-
following in dir/.gitattributes:
152+
sub-directories of dir/. To encrypt an entire sub-tree dir/, use `dir/**`:
153153

154-
* filter=git-crypt diff=git-crypt
155-
.gitattributes !filter !diff
156-
157-
The second pattern is essential for ensuring that .gitattributes itself
158-
is not encrypted.
154+
dir/** filter=git-crypt diff=git-crypt
159155

160156

161157
MAILING LISTS

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ encrypt all files beneath it.
153153
Also note that the pattern `dir/*` does not match files under
154154
sub-directories of dir/. To encrypt an entire sub-tree dir/, use `dir/**`:
155155

156-
/dir/** filter=git-crypt diff=git-crypt
156+
dir/** filter=git-crypt diff=git-crypt
157157

158158
Mailing Lists
159159
-------------

0 commit comments

Comments
 (0)