@@ -21,6 +21,7 @@ Synopsis
2121 git secrets --add-provider [--global] <command> [arguments...]
2222 git secrets --register-aws [--global]
2323 git secrets --aws-provider [<credentials-file>]
24+ git secrets --remove [-d|--deleteallowed] [-u|--deleteliteral] [--global] <pattern>
2425
2526
2627Description
@@ -181,6 +182,9 @@ Each of these options must appear first on the command line.
181182 Secret provider that outputs credentials found in an INI file. You can
182183 optionally provide the path to an INI file.
183184
185+ ``--remove ``
186+ Removes a pattern or literal added as allowed or prohibited
187+
184188
185189Options for ``--install ``
186190~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -389,6 +393,41 @@ Cats secrets out of a file::
389393
390394 git secrets --add-provider -- cat /path/to/secret/file/patterns
391395
396+ Options for ``--remove ``
397+ ~~~~~~~~~~~~~~~~~~~~~
398+
399+ ``--global ``
400+ Adds patterns to the global git config
401+
402+ ``-u, --deleteliteral ``
403+ Removes a literal pattern added with the --add command.
404+
405+ ``-d, --deleteallowed ``
406+ Deletes an allowed pattern
407+
408+ ``<pattern> ``
409+ The regex pattern to search.
410+
411+
412+ Examples
413+ ^^^^^^^^
414+
415+ Removes a prohibited pattern to the current repo::
416+
417+ git secrets --remove '[A-Z0-9]{20}'
418+
419+ Removes a prohibited pattern to the global git config::
420+
421+ git secrets --remove --global '[A-Z0-9]{20}'
422+
423+ Removes a string that is scanned for literally (``+ `` is escaped)::
424+
425+ git secrets --remove --deleteliteral 'foo+bar'
426+
427+ Removes an allowed pattern::
428+
429+ git secrets --remove -d 'allowed pattern'
430+
392431
393432Defining prohibited patterns
394433----------------------------
0 commit comments