search

Home  >  Q&A  >  body text

git cannot switch to master branch

After I create a branch using this command. git branch new_featuregit checkout new_feature
and then using the git checkout master command will not switch to the main branch.
Error: error: pathspec 'master' did not match any file(s) known to git.
What is going on? Ask for guidance. Thanks!

怪我咯怪我咯2813 days ago785

reply all(1)I'll reply

  • PHP中文网

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

    This error should be that there is no master this branch, you can pass

    git branch

    See what branches are currently available
    or git checkout -b master switch back to the main branch.

    reply
    0
  • Cancelreply