Veske
Veske

Reputation: 557

Unable to push to existing heroku app

So I have this app in my heroku and I want to push my code into it. I did a heroku git:remote -a harjutus2 and it tells me Git remote heroku allready exist. What am i doing wrong?

Upvotes: 1

Views: 944

Answers (3)

Amar_AI
Amar_AI

Reputation: 91

I have faced the similar issue

  • git commit -m "My first commit" # Creates initial commit
  • heroku create # To create a new app

#If you want to push code to already created app

  • heroku git:remote -a tranquil-hamlet-92495(Mention the Full name of the app created in Heroku)
  • git push heroku master

This will solve the issue

Upvotes: 0

Phebian Chukwurah
Phebian Chukwurah

Reputation: 71

After updating your git branch like this:

  • git add .
  • git commit -m "Insert Any Description you choose"
  • git push origin your-branch-name

Do this to update already existing heroku with the new code changes:

  • git push heroku your-branch-name:master

Upvotes: 0

Moin
Moin

Reputation: 1143

This nice article explains the basics of git for heroku.

To push, first you have to commit.

try:

git commit -am "1st"
git remote add heroku
git push  heroku master

these are different commands. Try running them one after another.

Upvotes: 1

Related Questions