git 解决HEAD detached from

执行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

打赏

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

git 解决HEAD detached from_第1张图片
支付宝.jpg
git 解决HEAD detached from_第2张图片
微信.jpg

你可能感兴趣的:(git 解决HEAD detached from)