From 3d3ba75abbcf400801632674a13ad4f9d1876f58 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 28 May 2025 13:53:10 +0200 Subject: [PATCH] git: Use commit.template for a 2nd newline When I write commit messages in vim, I often use gwap to format the message body. This breaks if there is no empty line between the body and the following "Please enter the commit message for your changes..." comment. So, to not always have to add this empty line first, I use a commit.template file that simply contains one empty line. --- .config/git/config | 5 +++++ .config/git/message.template | 1 + 2 files changed, 6 insertions(+) create mode 100644 .config/git/message.template diff --git a/.config/git/config b/.config/git/config index 6549b8d..982f9c6 100644 --- a/.config/git/config +++ b/.config/git/config @@ -53,6 +53,11 @@ ui = auto,column,dense [commit] gpgsign = true + + # Add an additional newline, so that I can format the body more easily + # TODO: is there a way to use XDG_CONFIG_HOME? + template = ~/.config/git/message.template + verbose = true [core] abbrev = 12 diff --git a/.config/git/message.template b/.config/git/message.template new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.config/git/message.template @@ -0,0 +1 @@ +