My ref HEAD
points the branch foo
, that points to the commit 123abc
; and I have some staged work.
How to git commit
that work, moving the HEAD
to the newly created commit, but without advancing the branch?
(hence: leaving foo
point to 123abc
)
Is it possible to do it with a single git
command?
Simply detach, then commit: