diff --git a/git-secrets.1 b/git-secrets.1 index 17a322c..3edb173 100644 --- a/git-secrets.1 +++ b/git-secrets.1 @@ -69,6 +69,8 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] \fI\%Options for \fB\-\-aws\-provider\fP\fP .IP \(bu 2 \fI\%Options for \fB\-\-add\-provider\fP\fP +.IP \(bu 2 +\fI\%Options for \fB\-\-remove\fP\fP .UNINDENT .IP \(bu 2 \fI\%Defining prohibited patterns\fP @@ -97,6 +99,7 @@ git secrets \-\-add [\-a|\-\-allowed] [\-l|\-\-literal] [\-\-global] git secrets \-\-add\-provider [\-\-global] [arguments...] git secrets \-\-register\-aws [\-\-global] git secrets \-\-aws\-provider [] +git secrets \-\-remove [\-d|\-\-deleteallowed] [\-u|\-\-deleteliteral] [\-\-global] .ft P .fi .UNINDENT @@ -136,7 +139,7 @@ the directory to the current user \fBPATH\fP\&. .sp .nf .ft C -PS > ./install.ps1 +powershell \-file install.ps1 .ft P .fi .UNINDENT @@ -298,6 +301,9 @@ do not commit credentials to a repository. .B \fB\-\-aws\-provider\fP Secret provider that outputs credentials found in an INI file. You can optionally provide the path to an INI file. +.TP +.B \fB\-\-remove\fP +Removes a pattern or literal from the git config .UNINDENT .SS Options for \fB\-\-install\fP .INDENT 0.0 @@ -629,6 +635,83 @@ git secrets \-\-add\-provider \-\- cat /path/to/secret/file/patterns .fi .UNINDENT .UNINDENT +.SS Options for \fB\-\-remove\fP +.IP "System Message: WARNING/2 (README.rst:, line 400)" +Title underline too short. +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +Options for \(ga\(ga\-\-remove\(ga\(ga +~~~~~~~~~~~~~~~~~~~~~ +.ft P +.fi +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \fB\-\-global\fP +Removes patterns from the global git config +.TP +.B \fB\-u, \-\-deleteliteral\fP +Removes a literal pattern added with the \-\-add command from the git config +.TP +.B \fB\-d, \-\-deleteallowed\fP +Removes an allowed pattern from the git config +.TP +.B \fB\fP +The regex pattern to remove. +.UNINDENT +.SS Examples +.sp +Removes a prohibited pattern to the current repo: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +git secrets \-\-remove \(aq[A\-Z0\-9]{20}\(aq +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Removes a prohibited pattern to the global git config: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +git secrets \-\-remove \-\-global \(aq[A\-Z0\-9]{20}\(aq +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Removes a string that is scanned for literally (\fB+\fP is escaped): +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +git secrets \-\-remove \-\-deleteliteral \(aqfoo+bar\(aq +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Removes an allowed pattern: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +git secrets \-\-remove \-d \(aqallowed pattern\(aq +.ft P +.fi +.UNINDENT +.UNINDENT .SH DEFINING PROHIBITED PATTERNS .sp \fBegrep\fP\-compatible regular expressions are used to determine if a commit or @@ -640,6 +723,10 @@ like Ubuntu (BSD vs GNU). .sp You can add prohibited regular expression patterns to your git config using \fBgit secrets \-\-add \fP\&. +.sp +You can also add prohibited regular expressions patterns to a +\fB\&.gitprohibited\fP file located in the repository\(aqs root directory. Lines starting +with \fB#\fP are skipped (comment line) and empty lines are also skipped. .SH IGNORING FALSE POSITIVES .sp Sometimes a regular expression might match false positives. For example, git