美文网首页git
git 解决HEAD detached from

git 解决HEAD detached from

作者: 谢昆明 | 来源:发表于2017-08-14 07:50 被阅读560次

执行git rebase、git checkout出现这个问题

$ git rebase origin/master upstream/master 
$ git checkout master
Warning: you are leaving 13 commits behind, not connected to
any of your branches:

  7c6fa98 io: more guards against NULL filename (#7159)
  cc63df4 lua/executor: Fix crash when printing empty string (#7157)
  669c930 travis: Move TSAN to last stage and allow failure
  af719b5 tui: fix DECSCUSR logic #6997
 ... and 9 more.

If you want to keep them by creating a new branch, this may be a good time
to do so with:

 git branch new_branch_name 7c6fa98

Switched to branch 'master'

解决方法:

$ git branch new_branch_name 7c6fa98
$ git merge new_branch_name
$ git branch -D new_branch_name

打赏

如果这篇文章解决了您的问题,让我买根烟抽抽。

支付宝.jpg 微信.jpg

相关文章

网友评论

    本文标题:git 解决HEAD detached from

    本文链接:https://www.haomeiwen.com/subject/pdnsrxtx.html