🤓 danott.co

Today I Learned

Thanks to my partner in code, I learned that you can change the character that begins a comment in a Git commit message.

From the docs:

Commands such as commit and tag that let you edit messages consider a line that begins with this character commented, and removes them after the editor returns (default #).

If set to “auto”, git-commit would select a character that is not the beginning character of any line in existing commit messages.

I’m often writing Markdown in my commit messages, to leverage their legibility in other contexts. Before this configuration, headings were off limits. Now that I’ve changed my configuration with git config --global core.commandChar ";", they’re gonna be all over the place.