18 lines
427 B
Markdown
18 lines
427 B
Markdown
---
|
|
title: Add a commit message template
|
|
tags: repository,configuration,advanced
|
|
---
|
|
|
|
Sets up a commit message template for the current repository.
|
|
|
|
- Use `git config commit.template <file>` to specify `<file>` as the commit message template for the current repository.
|
|
|
|
```sh
|
|
git config commit.template <file>
|
|
```
|
|
|
|
```sh
|
|
git config commit.template "commit-template"
|
|
# Sets "commit-template" as the commit message template
|
|
```
|