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
@@ -402,13 +402,39 @@ Once users have generated their desired commit message, they can proceed to comm
402
402
403
403
### Ignore files
404
404
405
-
You can remove files from being sent to OpenAI by creating a `.opencommitignore` file. For example:
405
+
You can remove files from being sent to OpenAI by creating ignore files. OpenCommit supports both local and global ignore files:
406
+
407
+
#### Local ignore file
408
+
409
+
Create a `.opencommitignore` file in your project root:
406
410
407
411
```ignorelang
408
412
path/to/large-asset.zip
409
413
**/*.jpg
414
+
docs/generated/
415
+
*.generated.ts
410
416
```
411
417
418
+
#### Global ignore file
419
+
420
+
Create a global `.opencommitignore` file in your home directory (`~/.opencommitignore`) to ignore files across all projects:
421
+
422
+
```ignorelang
423
+
*.log
424
+
*.tmp
425
+
.DS_Store
426
+
node_modules/
427
+
.env
428
+
.env.local
429
+
dist/
430
+
build/
431
+
coverage/
432
+
.vscode/
433
+
.idea/
434
+
```
435
+
436
+
**Priority:** Local ignore rules are applied after global rules. Both files use [gitignore syntax](https://git-scm.com/docs/gitignore#_pattern_format).
437
+
412
438
This helps prevent opencommit from uploading artifacts and large files.
413
439
414
440
By default, opencommit ignores files matching: `*-lock.*` and `*.lock`
0 commit comments