@@ -69,6 +69,8 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
69
69
\fI \% Options for \fB \-\- aws \- provider \fP\fP
70
70
.IP \(bu 2
71
71
\fI \% Options for \fB \-\- add \- provider \fP\fP
72
+ .IP \(bu 2
73
+ \fI \% Options for \fB \-\- remove \fP\fP
72
74
.UNINDENT
73
75
.IP \(bu 2
74
76
\fI \% Defining prohibited patterns \fP
@@ -97,6 +99,7 @@ git secrets \-\-add [\-a|\-\-allowed] [\-l|\-\-literal] [\-\-global] <pattern>
97
99
git secrets \-\- add\- provider [\-\- global] <command> [arguments...]
98
100
git secrets \-\- register\- aws [\-\- global]
99
101
git secrets \-\- aws\- provider [<credentials\- file>]
102
+ git secrets \-\- remove [\- d|\-\- deleteallowed] [\- u|\-\- deleteliteral] [\-\- global] <pattern>
100
103
.ft P
101
104
.fi
102
105
.UNINDENT
@@ -136,7 +139,7 @@ the directory to the current user \fBPATH\fP\&.
136
139
.sp
137
140
.nf
138
141
.ft C
139
- PS > ./ install.ps1
142
+ powershell \- file install.ps1
140
143
.ft P
141
144
.fi
142
145
.UNINDENT
@@ -298,6 +301,9 @@ do not commit credentials to a repository.
298
301
.B \fB \-\- aws \- provider \fP
299
302
Secret provider that outputs credentials found in an INI file. You can
300
303
optionally provide the path to an INI file.
304
+ .TP
305
+ .B \fB \-\- remove \fP
306
+ Removes a pattern or literal from the git config
301
307
.UNINDENT
302
308
.SS Options for \fB \-\- install \fP
303
309
.INDENT 0.0
@@ -629,6 +635,83 @@ git secrets \-\-add\-provider \-\- cat /path/to/secret/file/patterns
629
635
.fi
630
636
.UNINDENT
631
637
.UNINDENT
638
+ .SS Options for \fB \-\- remove \fP
639
+ .IP " System Message: WARNING/2 (README.rst:, line 400)"
640
+ Title underline too short.
641
+ .INDENT 0.0
642
+ .INDENT 3.5
643
+ .sp
644
+ .nf
645
+ .ft C
646
+ Options for \(ga \(ga \-\- remove\(ga \(ga
647
+ ~~~~~~~~~~~~~~~~~~~~~
648
+ .ft P
649
+ .fi
650
+ .UNINDENT
651
+ .UNINDENT
652
+ .INDENT 0.0
653
+ .TP
654
+ .B \fB \-\- global \fP
655
+ Removes patterns from the global git config
656
+ .TP
657
+ .B \fB \- u, \-\- deleteliteral\fP
658
+ Removes a literal pattern added with the \-\- add command from the git config
659
+ .TP
660
+ .B \fB \- d, \-\- deleteallowed\fP
661
+ Removes an allowed pattern from the git config
662
+ .TP
663
+ .B \fB <pattern> \fP
664
+ The regex pattern to remove.
665
+ .UNINDENT
666
+ .SS Examples
667
+ .sp
668
+ Removes a prohibited pattern to the current repo:
669
+ .INDENT 0.0
670
+ .INDENT 3.5
671
+ .sp
672
+ .nf
673
+ .ft C
674
+ git secrets \-\- remove \(aq [A\- Z0\- 9]{20}\(aq
675
+ .ft P
676
+ .fi
677
+ .UNINDENT
678
+ .UNINDENT
679
+ .sp
680
+ Removes a prohibited pattern to the global git config:
681
+ .INDENT 0.0
682
+ .INDENT 3.5
683
+ .sp
684
+ .nf
685
+ .ft C
686
+ git secrets \-\- remove \-\- global \(aq [A\- Z0\- 9]{20}\(aq
687
+ .ft P
688
+ .fi
689
+ .UNINDENT
690
+ .UNINDENT
691
+ .sp
692
+ Removes a string that is scanned for literally (\fB + \fP is escaped):
693
+ .INDENT 0.0
694
+ .INDENT 3.5
695
+ .sp
696
+ .nf
697
+ .ft C
698
+ git secrets \-\- remove \-\- deleteliteral \(aq foo+bar\(aq
699
+ .ft P
700
+ .fi
701
+ .UNINDENT
702
+ .UNINDENT
703
+ .sp
704
+ Removes an allowed pattern:
705
+ .INDENT 0.0
706
+ .INDENT 3.5
707
+ .sp
708
+ .nf
709
+ .ft C
710
+ git secrets \-\- remove \- d \(aq allowed pattern\(aq
711
+ .ft P
712
+ .fi
713
+ .UNINDENT
714
+ .UNINDENT
632
715
.SH DEFINING PROHIBITED PATTERNS
633
716
.sp
634
717
\fB egrep \fP \- compatible regular expressions are used to determine if a commit or
@@ -640,6 +723,10 @@ like Ubuntu (BSD vs GNU).
640
723
.sp
641
724
You can add prohibited regular expression patterns to your git config using
642
725
\fB git secrets \-\- add <pattern> \fP \& .
726
+ .sp
727
+ You can also add prohibited regular expressions patterns to a
728
+ \fB \& .gitprohibited \fP file located in the repository\(aq s root directory. Lines starting
729
+ with \fB # \fP are skipped (comment line) and empty lines are also skipped.
643
730
.SH IGNORING FALSE POSITIVES
644
731
.sp
645
732
Sometimes a regular expression might match false positives. For example, git
0 commit comments