Remove commentary from git commit using git gui

134 Views Asked by At

I'm using a git commit template to standard my commits, but the commented lines (start with #) don't is erased after commit.

Can I configure the git gui to disregard theses lines? I use git gui as editor for commits.

I configure the the commit template using:

git config --global commit.template C:\Users\Name\.gitmessage

My .gitmessage file:

#<-------------( Title: 50 chars )-------------->#
# Title/Summary/Imperative/Captilized/No period

# remember blank line between title and body

#<-------------( Body: wrap it to about 72 chars or so )-------------->#
# Body: Explain *what* and *why* (not *how*). Include task ID (issue).
# Explain the problem that this commit is solving. Focus on why you
# are making this change as opposed to how (the code explains that).
# Are there side effects or other unintuitive consequences of this
# change? Here's the place to explain them.

# <blank line>

# Co-authored-by: name <[email protected]>

The idea is that all the lines of the template are not included in the commit, the lines that start with # are ignored.

EDIT:

Using the VS Code as the main editor works well.

$ git config --global core.editor "code --wait"

0

There are 0 best solutions below