no branch 问题

Posted 柒月

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了no branch 问题相关的知识,希望对你有一定的参考价值。

现象如下:

lynn.feng:~/project/Git/M_MT6737_MP$ git branch -a
* (no branch)
a36_panasonic_l004
b36_panasonic_tmp
master

 

lynn.feng:~/project/Git/M_MT6737_MP$ git checkout master
kernel-3.18/drivers/input/touchscreen/mediatek/GT9XX_B36/gt9xx_driver.c: needs merge
error: you need to resolve your current index first

 

lynn.feng:~/project/Git/M_MT6737_MP$ git status
# Not currently on any branch.

 

该问题已经说的很明白了,有文件没有提交,所以git树无法统一,解决方法如下:

git reset --merge 

以上是关于no branch 问题的主要内容,如果未能解决你的问题,请参考以下文章

Git master branch has no upstream branch的解决

Can't update: no tracked branch No tracked branch configured for branch dev.

解决问题:There is no tracking information for the current branch

解决问题:There is no tracking information for the current branch

解决问题:There is no tracking information for the current branch

[已解决]Can't update: no tracked branch