'heroku' does not appear to be a git repository

867    Asked by Aryangupta in Devops , Asked on Feb 26, 2021
Answered by Aryan gupta

To add a Heroku app as a Git remote, you need to execute heroku git:remote -a yourapp.

Here is a proper demonstration:

Initialize GIT

 $ cd myapp $ git init $ git add . $ git commit -m "my first commit"

Then create (initialize) heroku app with:

$ heroku create YourAppName

Lastly, add git remote:

$ heroku git:remote -a YourAppName

Now you can safely deploy your app with:

$ git push heroku master

You should wait for some time and see if you don't get any error/interrupt on console while deploying.



Your Answer

Interviews

Parent Categories