Interview Prep/Git & GitHub/Undoing changes: reset, revert, restore and reflog

What is `git commit --allow-empty` used for?

BeginnerConceptUndoing changes: reset, revert, restore and reflog
Answer

It creates a commit with no changes. Common uses are retriggering CI without touching code, marking a point in history, or creating an initial root commit for a branch.

git commit --allow-empty -m "ci: retrigger"
All Git & GitHub questions Roadmap: Git & GitHub

More on Undoing changes: reset, revert, restore and reflog