Maison  >  Questions et réponses  >  le corps du texte

git 无法切换到主分支

我在用该指令创建一个分支之后。git branch new_featuregit checkout new_feature
再用git checkout master指令他就无法切换到主分支。
报错:error: pathspec 'master' did not match any file(s) known to git.
请问这是怎么回事?求指导。谢谢!

怪我咯怪我咯2727 Il y a quelques jours726

répondre à tous(1)je répondrai

  • PHP中文网

    PHP中文网2017-05-02 09:33:08

    Cette erreur devrait être qu'il n'y a pas de branche master, vous pouvez passer

    git branch

    Regardez les branches actuelles
    ou git checkout -b master revenez à la branche principale.

    répondre
    0
  • Annulerrépondre