Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the default commit template with Git Extensions

Git Extensions has a feature called commit templates that I use a lot when committing code to make sure that the number of characters per line never exceeds a certain maximum and that the second line is always blank, basically so that my commit messages are well formed.

I have only 1 commit template set, but I still have to manually select it when committing. Is there any way to have this commit template automatically selected when I start a new commit?

like image 991
Carl Avatar asked Oct 27 '25 00:10

Carl


1 Answers

For GitExtensions > 2.50.02 you can add a template under Tools -> Settings -> Git Config -> Path to commit template

and add whatever path you want. You can toggle the Settings source under the same window to effect all repos or just your local repo.

Alternatively if you want to use the command line instead you could do:

$ git config --global commit.template <path_to_your_.txt_template_file>

like mentioned here

like image 65
Or b Avatar answered Oct 29 '25 15:10

Or b



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!