On Aug 12, 3:18 am, Konstantin Khomoutov <khomou...@gmail.com> wrote: > > That's because you created a situation known as "detached HEAD". > > > How can I fix this? I want "master" to point to the same place as HEAD. > > Record the name of the commit HEAD points at, checkout master and > "hard reset" it to that commit. The simplest way to do that is via a > branch or tag: > $ git tag foo > $ git checkout master > $ git reset --hard foo > $ git tag -d foo
Thank you for the help, that seems to have fixed the problem. One question: why is the "git checkout master" needed? (What would have happened if I had done the hard reset when the "detached head" was checked out?) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.