【发布时间】:2020-02-08 23:06:42
【问题描述】:
我已经分叉了一个 github 项目并想切换到我的分支。 我已将存储库条目添加到我的分叉 github 项目中,并且 composer 开始 克隆包。
Installing antibodies-online/omnipay-vr-payment (1.1.0): Cloning 7df29fad5d
接下来我检查原点是否是我的新分叉:
git remote -v
Output:
composer https://github.com/DemigodCode/omnipay-vr-payment (fetch)
composer https://github.com/DemigodCode/omnipay-vr-payment (push)
origin https://github.com/DemigodCode/omnipay-vr-payment (fetch)
origin https://github.com/DemigodCode/omnipay-vr-payment (push)
没关系,我的叉子。现在我想列出所有可用的分支:
git branch -a
Output:
* (no branch)
master
remotes/composer/2DS20
remotes/composer/master
remotes/origin/2DS20
remotes/origin/HEAD -> origin/master
remotes/origin/master
我缺少没有遥控器/来源的 2DS20 分支。
如果我现在想切换到 2DS20:
git checkout 2DS20
error: pathspec '2DS20' did not match any file(s) known to git.
我不知道,这里发生了什么?在另一台服务器上它工作得很好。有什么想法吗?
在另一台服务器上,当我运行 git status 时,将打印以下内容:
# On Tag v1.1.0.
nothing to commit (working directory clean)
在我的机器上:
# Not currently on any branch.
nothing to commit (working directory clean)
【问题讨论】:
标签: git github composer-php