0
我跟着Heroku的方向克隆我的回购协议:Heroku + Git:我如何推送到我的远程分支?产地/主被分离
Clone the repository
Use Git to clone indigo-oms's source code to your local machine.
$ heroku git:clone -a indigo-oms
$ cd indigo-oms
Deploy your changes
Make some changes to the code you just cloned and deploy them to Heroku using Git.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
但现在每当我试图结帐的主人,它把我送到heroku/master
。我希望能够结帐我的origin/master
并能够先推送到,然后结帐heroku/master
,将我的origin/master
更改合并到它中,然后再推送。
它说当我尝试检出起源/主
➜ indigo-oms git:(3f939ff) git co master
Switched to branch 'master'
Your branch is up-to-date with 'heroku/master'.
➜ indigo-oms git:(master) git checkout origin
error: pathspec 'origin' did not match any file(s) known to git.
➜ indigo-oms git:(master) git checkout origin/master
Note: checking out 'origin/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 3f939ff... no need for comfirmation
➜ indigo-oms git:(3f939ff)
这里是我所看到的,当我运行git remote
它超脱:
➜ indigo-oms git:(3f939ff) git remote
heroku
origin
第二个命令它抱怨分支已经存在,主'它发送给'heroku /主' – Edmund
然后它听起来像你的默认出处是'heroku'。但它不应该把你带到'heroku/master';这是一个跟踪分支。 –
@埃德蒙我给你另一个更新,希望它更清楚一点。 –