Usefulness of --pre-commit flag in git subcommand #1885
Answered
by
bplaxco
pantelis-karamolegkos
asked this question in
Q&A
-
|
I have created a file with a secret within a locally cloned I have already run Here are some executions So at the end of the day what does the |
Beta Was this translation helpful? Give feedback.
Answered by
bplaxco
Jun 4, 2025
Replies: 1 comment
-
|
Based on the code in cmd/git.go it looks like
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pantelis-karamolegkos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on the code in cmd/git.go it looks like
--stagedimplies--pre-commit. The--pre-commitcommand just does a scan against the git diff instead of the history.--pre-commitwithout--stagedlooks like it scans unstaged changes.