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';這是一個跟蹤分支。 –
@埃德蒙我給你另一個更新,希望它更清楚一點。 –