- I went back, checked out
good (detached HEAD now).
- I did commit
one, in detached HEAD state.
I would like to have some help to put one just after good.
one is after good. git commit updates HEAD, every time, no matter what. When you check out a branch tip, git sets the HEAD reference as an alias for that branch tip reference, it "attaches" it to that branch tip reference. A detached HEAD is just a reference directly to a particular commit, so when git commit updates it, HEAD now refers to the new one. But git commit always adds the old HEAD commit as the parent of the new one.
So just
git checkout -B current one # if you don't still have `one` checked out
or just
git checkout -B current # if you do