0

I've set in C:\Users\myUser\.gitconfig

[commit]
    template = ~/message.txt     //btw: i've also tried: ~user/message.txt 

and saved some text in message.txt in that same folder.

however, when I try to commit one of my repos, commit field is still empty: enter image description here

do i miss any step?

T.Todua
  • 53,146
  • 19
  • 236
  • 237

1 Answers1

1

You should try to specify the full path in your config. For example this is my config on linux and this works:

[commit]
template = /home/mmauksch/.gitmessage

Which in your case should probably be:

[commit]
template = C:/Users/myUser/.gitmessage

because there's a good chance that the concept of ~ as "home directory of the current user" doesn't really make sense in a windows context.

Markus Mauksch
  • 397
  • 1
  • 9