Is it possible to options for the Version Control's git commit command? If so, how?
I'm a heavy user of the integrated source control UI in VS Code and I often need to provide extra options like --no-verify
to the git commit
. I still didn't figure out a way of doing this in VS Code.
Thanks!
The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.
The "-m" option allows you to write the message in-line with the "commit" command, instead of first opening the message interface, writing the message, and saving and quiting the message interface.
Show global git config settings But at runtime, only the value set locally is used. If you would like to delete or edit a Git config value manually with a text editor, you can find the Git config file locations through the Git config list command's –show-origin switch.
With VSCode 1.50 (Sept 2020), there should now be more option for git commit
in VSCode.
See PR 106335: Adds commands for --no-verify
commit variants
This PR adds
*NoVerify
command variants for creating commits while skipping pre-commit and commit-msg hooks.The commands are only displayed if the
git.allowNoVerifyCommit
option is set to true.
This type of commits requires additional confirmation (likegit.pushForce
does), which can be bypassed by disabling thegit.confirmNoVerifyCommit
option.
As illustrated with issue 110452, commit --no-verify
will be in VSCode 1.52 (Nov. 2020)
Once you
enablegit.allowNoVerifyCommit
, a bunch of commands will be available:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With