0

I had uploaded the nodejs app on heroku it works perfectly but after some days i created a git repository on GitHub and uploaded the source code there but during uploading it shows that some number of files would be changed and after uploading when i see my GitHub repo there it says that files are uploaded 37days ago How this is happening? can anyone explain please I used heroku git integration to deploy app on heroku

1
  • Welcome to Stack Overflow. Unfortunately, your question is unclear. Please read How to Ask. Commented May 6, 2019 at 1:37

1 Answer 1

2

First, let me explain how heroku works.

It uses its own git repository to trigger builds and deploys when you push code. You have been pushing code to heroku with git push heroku master, right?

That's only updating code on heroku. (Which is what matters for your live site)

When you push to heroku, it is saving your code in its git repository, so your code is safe, don't sweat about it! But it's nice to see that deploy log trace on your terminal, and that's why I use it.

In order for you to update your code to github, you also have to push your code there!

What the github integration at the heroku dashboard does, is that it lets you trigger deploys on heroku using github, if you activate that, you will push your code to github then heroku then will pull your code FROM github and deploy it.

But that doesn't work the other way around, heroku doesn't update your github repository, it only uses your github repository to update itself in order to deploy new code.

This: enter image description here Got it?

Sign up to request clarification or add additional context in comments.

2 Comments

Can i able to see that heroku github repository
I've updated the answer with a screenshot. Yes, you can enable heroku deploys from github pushes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.