I have a local Git repository I\'ve been developing under for a few days: it has eighteen commits so far. Tonight, I created a private Github repository I was hoping to push
I've had this same problem twice, and finally figured out what I was doing that was causing it. In the process of editing an old commit with git rebase -i
, instead of calling git commit --amend
, I was calling git commit -a
by force of habit, immediately followed by git rebase --continue
, of course. Someone else might be able to explain what's going on behind the scenes, but it seems that the result is the detached HEAD problem.