Files
30-seconds-of-code/snippets/git/s/create-empty-commit.md
Angelos Chalaris 4d0316a062 Update covers
2023-05-07 22:25:00 +03:00

22 lines
435 B
Markdown

---
title: Create an empty commit
type: snippet
language: git
tags: [commit]
cover: compass-2
dateModified: 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"
```