empty commit
A commit whose snapshot is identical to its parent's, which Git only makes when you pass --allow-empty.
In more detail
It changes no files but still gets its own ID, author and message. Tutorials and scripts use it to create a commit quickly, for example to trigger a build or test a push.
Example
git commit --allow-empty -m 'Second'Related terms
- git commit — The command that records the staging area as a new commit whose parent is the current commit, then moves the current branch to it.
- commit — A saved snapshot of the whole project in Git, together with its author, committer, time, message and a pointer to the commit before it.
Taught in
- Committing, And What A Good Message Says — Advanced Git Internals & Distributed Workflows
- Conventional Commits — Advanced Git Internals & Distributed Workflows
- Clone, Forks, Push, And The Upstream Branch — Advanced Git Internals & Distributed Workflows
- The Pull Request, And Branch Naming — Advanced Git Internals & Distributed Workflows