Just do this:

    git checkout master

<sup>This will delete your detached head and set your version to your current origin/master.</sup>

If that doesn't fix it, this will:

    git checkout -b temp
    git branch -f master temp
    git checkout master