File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,18 @@ See [the docs for `--color-moved`](https://git-scm.com/docs/git-diff#Documentati
508
508
See [ the relevant section for PR authors] ( #git-range-diff ) . This can be useful for comparing code
509
509
that was force-pushed to make sure there are no unexpected changes.
510
510
511
+ ### Ignoring changes to specific files
512
+
513
+ Many large files in the repo are autogenerated. To view a diff that ignores changes to those files,
514
+ you can use the following syntax (e.g. Cargo.lock):
515
+
516
+ ```
517
+ git log -p ':!Cargo.lock'
518
+ ```
519
+
520
+ Arbitrary patterns are supported (e.g. ` :!compiler/* ` ). Patterns use the same syntax as
521
+ ` .gitignore ` , with ` : ` prepended to indicate a pattern.
522
+
511
523
## Git submodules
512
524
513
525
** NOTE** : submodules are a nice thing to know about, but it * isn't* an absolute
You can’t perform that action at this time.
0 commit comments