我从Heroku拉了一个项目,现在当我试图在这个项目中在我的本地主机上创建一个新的分支时,我总是得到这个错误消息:
git checkout new_branch
error: pathspec 'new_branch' did not match any file(s) known to git.
当我运行git branch -a
,我得到
* master
remotes/heroku/HEAD -> heroku/master
remotes/heroku/master
是什么导致这个错误?我怎样才能解决这个问题?
谢谢
您需要输入git checkout -b new_branch
来创建分支。查看这里的结帐文档: