Add commit variants

This commit is contained in:
Isabelle Viktoria Maciohsek
2021-04-04 20:55:26 +03:00
parent 933f0a40e3
commit 2c0ba554cd
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,17 @@
---
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"
```