为什么repo sync下来的代码处于no branch的状态

repo sync下来的代码为什么git branch看本地branch是no branch?

阅读 8.6k
3 个回答

你repo init是怎样的?有没有指定branch?或者你可以git branch -a查看所有分支,再切换到你想要的分支。

我可以相信,你没有cd进入刚才clone的目录

试试

git fetch  --all && git reset --hard origin/master
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题