18 lines
351 B
Markdown
18 lines
351 B
Markdown
---
|
|
title: Create an empty commit
|
|
tags: commit,beginner
|
|
---
|
|
|
|
Creates an empty commit.
|
|
|
|
- Use `git commit --allow-empty -m <message>` to create an empty commit with the provided `<message>`.
|
|
|
|
```sh
|
|
git commit --allow-empty -m <message>
|
|
```
|
|
|
|
```sh
|
|
git commit --allow-empty -m "Empty commit"
|
|
# Creates an empty commit with the message "Empty commit"
|
|
```
|