26 ms·
That's another screwup in git. That commit does not behave like a commit. For instance, you cannot do this: git reset HEAD^ -- file # stage a file remova
by kazinator 4y ago
That's another screwup in git. That commit does not behave like a commit.
For instance, you cannot do this:
git reset HEAD^ -- file # stage a file removal from the commit
or say you have made two commits and want to reorder them with interactive rebase
git rebase -i HEAD^^ # oops
Whenever I start a new repo, I do this:
git init
git commit --allow-empty -m NIL
to create a commit that actually serves as a "terminating nil" in the list since for unfathomable reasons, the 0 commit hash doesn't serve that purpose. You can't point at that 0 with HEAD^ to indicate "the point before this commit".