You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -327,13 +327,39 @@ Once users have generated their desired commit message, they can proceed to comm
327
327
328
328
### Ignore files
329
329
330
-
You can remove files from being sent to OpenAI by creating a `.opencommitignore` file. For example:
330
+
You can remove files from being sent to OpenAI by creating ignore files. OpenCommit supports both local and global ignore files:
331
+
332
+
#### Local ignore file
333
+
334
+
Create a `.opencommitignore` file in your project root:
331
335
332
336
```ignorelang
333
337
path/to/large-asset.zip
334
338
**/*.jpg
339
+
docs/generated/
340
+
*.generated.ts
335
341
```
336
342
343
+
#### Global ignore file
344
+
345
+
Create a global `.opencommitignore` file in your home directory (`~/.opencommitignore`) to ignore files across all projects:
346
+
347
+
```ignorelang
348
+
*.log
349
+
*.tmp
350
+
.DS_Store
351
+
node_modules/
352
+
.env
353
+
.env.local
354
+
dist/
355
+
build/
356
+
coverage/
357
+
.vscode/
358
+
.idea/
359
+
```
360
+
361
+
**Priority:** Local ignore rules are applied after global rules. Both files use [gitignore syntax](https://git-scm.com/docs/gitignore#_pattern_format).
362
+
337
363
This helps prevent opencommit from uploading artifacts and large files.
338
364
339
365
By default, opencommit ignores files matching: `*-lock.*` and `*.lock`
0 commit comments