Search code examples
gitvisual-studio-codeeditorcommitcommit-message

change template for commit message in vs code


Im am using VS Code to write commit messages. When I type git commit -a VS Code starts up with this text:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch assi
# Changes to be committed:
#   modified:   Default_Navigation.cs
#

is it possible to change this template?


Solution

  • git config commit.template /absolute/path/to/template_file seems to be the way to go. Check out How to specify a git commit message template for a repository in a file at a relative path to the repository?