小编Jon*_*onW的帖子

当从分离的头部切换回分支时,Git"保持遗留"

对于我们仓库中的某些提交(但不是全部),如果我检查提交,然后返回到主分支,我会收到一个关于提交被遗忘的意外警告:

# Check out one of the commits in question:
$ git checkout dd33caa5b004b0e3bd449152f9335e40450db91c
Note: checking out 'dd33caa5b004b0e3bd449152f9335e40450db91c'.

You are in 'detached HEAD' state. You can look around, make experimental
[...]
HEAD is now at dd33caa... Organized DataStore build files, added cleanup targets.

# Now switch back to the master branch so I can work:
$ git checkout master
Warning: you are leaving 17 commits behind, not connected to
any of your branches:

  dd33caa Organized DataStore build files, added cleanup …
Run Code Online (Sandbox Code Playgroud)

git

4
推荐指数
1
解决办法
2830
查看次数

标签 统计

git ×1