Skip to content

Commit ef34afa

Browse files
committed
add gitmessage
1 parent 71ae268 commit ef34afa

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/gitmessage.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Create your commit message template file
2+
1. For example, create a file at ~/.gitmessage.txt:
3+
```
4+
vi ~/.gitmessage.txt
5+
```
6+
Add your desired template, e.g.:
7+
```
8+
# Title: Short summary (50 chars max)
9+
10+
# Description: Detailed explanation (wrap at 72 chars)
11+
12+
# Issue: Link or ID
13+
```
14+
Save and exit
15+
16+
2. Set it as your global Git commit message template:
17+
```
18+
git config --global commit.template ~/.gitmessage.txt
19+
```
20+
3. Confirm it's set correctly:
21+
```
22+
git config --global --get commit.template
23+
```
24+
It should return:
25+
```
26+
/home/yourusername/.gitmessage.txt
27+
```
28+
Result:
29+
Now every time you run git commit (without -m), your editor will open with this template pre-filled.
30+
31+
Let me know if you want an example tailored to a specific use case (like bug tracking, feature development, etc).

0 commit comments

Comments
 (0)