How to make detached head the original branch?

This question already has an answer here:

  • How can I reconcile detached HEAD with master/origin? 24 answers

  • 如果你想忘记你的改变,只需将你的本地分支设置在远程分支所在的位置:

    git checkout local-branch git reset --hard the-remote/remote-branch

    链接地址: http://www.djcxy.com/p/23600.html

    上一篇: 为什么我的Git仓库进入独立HEAD状态?

    下一篇: 如何让分离的头部原来的分支?