Reputation: 11523
This is what I did:
heroku git:remote -a myapp
git pull heroku master
fatal: Couldn't find remote ref master
myapp is an existing project, it is not new.
What am I doing wrong? How can I pull from Heroku?. Which branch name should I use?
Edit
The output of git remote -v:
heroku https://git.heroku.com/myapp.git (fetch)
heroku https://git.heroku.com/myapp.git (push)
origin [email protected]:misuper/myapp.git (fetch)
origin [email protected]:misuper/myapp.git (push)
Also, I tried git clone
in a new folder and it gives me the message "You appear to have cloned an empty repository". It is not empty.
And I tried doing the same thing with a different app and it worked correctly.
I'm lost here.
Upvotes: 1
Views: 5616
Reputation: 91
Here are some things to consider, and hopefully get you moving:
While Heroku uses 'git' to manage the movement of code to/from Heroku, it is itself not a code repository in the more general sense of Github
use heroku git:clone -a your-app-name
to clone an existing app into your local project directory
use git push heroku master
to push your code to Heroku for execution
You should be using Github or some other version control system to manage the actual lifecycle of your source code, eg Pulls, Branches, Merges, &c...
Regarding the error you ran into when trying to execute the heroku git:clone...
- how did the application myapp
come to be in Heroku in the first place? If you initially created the app using the Heroku Button on a Github repo, there is a bug today which results in the app being created, and the code deployed, but the source is not stored in the internal Heroku repo. If this is the case you will need to
git clone
the original repo to a local dir heroku git:remote -a myapp
to add Heroku as a remote repogit push heroku master
to deploy the code to the Heroku repoUpvotes: 1