Reputation: 2819
By wrong, I checked out the master
branch to a specific commit and added a new commit while Head
is not pointing to the Tip
(last commit)
now I got a "detached head"
What does that mean? and How can I move that Commit to be the last commit (Tip
)
Upvotes: 0
Views: 182
Reputation: 22047
# create a branch at the current commit
git branch temp
# get back on master
git checkout master
# bring the lost commit back
git merge temp
Upvotes: 2