Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku deployment, git remote not added

I'm new to Heroku, trying to follow the "Getting Started with NodeJS tutorial" and I got stuck at the "Deploy your App" stage.

When I run "heroku create" I do not get "Git remote heroku added". I realized it was missing after trying the "git push heroku master" step and getting "fatal: Not a git repository (or any of the parent directories): .git". What did I do wrong?

like image 562
sslss Avatar asked May 15 '15 08:05

sslss


2 Answers

After running heroku create my-amazing-app, you should see a response with the web url along with the git url. Use the git url (something like git.heroku.../my-amazing-app.git) to add the remote yourself like so:

git remote add heroku git.heroku.../my-amazing-app.git

Then running git remote -v should show the new remote with heroku.

like image 120
Hassan Avatar answered Oct 04 '22 05:10

Hassan


Please do following command then enter:

git init

After that you can git push heroku master again

like image 22
Tien Nguyen Avatar answered Oct 04 '22 04:10

Tien Nguyen