Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I undo commit template?

I once added global commit temlate by command:

git config --global commit.template .gitmessage.txt

Today I created my own repository and when I tried commit, I got error:

fatal: could not read '.gitmessage.txt': No such file or directory

It's fine, because I don't create .gitmessage.txt file. I wouldn't have a template for this repo. And here comes the question: How can I undo global commit template? I can overwrite global commit template but I can delete thi configuration.

I was trying:

git config --global commit.template ""

but i got similar error:

fatal: could not read '''': No such file or directory

And when I run command

git config --global commit.template

i got echo current template. Anyone can help me?

like image 297
Jaroslaw K. Avatar asked Mar 31 '17 15:03

Jaroslaw K.


1 Answers

git config --unset --global commit.template
like image 56
Charles Wei Avatar answered Sep 28 '22 04:09

Charles Wei