IDEA git 出现分支游离问题 You are in 'detached HEAD' state,

   Can't update: no current branch

        You are in 'detached HEAD' state, which means that you're not on any branch

        Checkout a branch to make update possible.、

 

 

 

 

解决方案

 

1.创建新的分支    git branch   XXXX

2.切换到你的工作分支    git checkout youname

3.合并代码     git merget    XXXX

4.成功

 

 

请提前备份或者查看 .git的HEAD文件,提前保存当前分支名

你可能感兴趣的:(git)