【发布时间】:2017-04-16 22:31:38
【问题描述】:
我按照 heroku 的指示克隆了我的 repo:
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
但是现在每当我尝试结帐 master 时,它都会将我发送到 heroku/master。我希望能够签出我的origin/master 并能够先推送到那个,然后签出heroku/master,将我的origin/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
【问题讨论】: