22 lines
478 B
Markdown
22 lines
478 B
Markdown
---
|
|
title: Create an empty commit
|
|
tags: commit
|
|
author: maciv
|
|
cover: blog_images/colorful-plastic.jpg
|
|
firstSeen: 2021-04-04T20:55:26+03:00
|
|
lastUpdated: 2021-04-13T21:10:59+03:00
|
|
---
|
|
|
|
Creates an empty commit.
|
|
|
|
- Use `git commit --allow-empty -m <message>` to create an empty commit with the provided `<message>`.
|
|
|
|
```shell
|
|
git commit --allow-empty -m <message>
|
|
```
|
|
|
|
```shell
|
|
git commit --allow-empty -m "Empty commit"
|
|
# Creates an empty commit with the message "Empty commit"
|
|
```
|