user3184899
user3184899

Reputation: 3069

Heroku push updates app, but not remote git branch

I'm using Heroku for my project.

Lately, when I tried to push updates to the project, I noticed it shows me an enormous number of objected counted (over 15K files), which is not the case (changed around 3K).

I tried to open the project on SourceTree and noticed that the local branch and the remote branch of "master" have a great difference between them. However, I am 100% sure that I pushed the presumably unpushed commits, and I am also sure the files are present in the Heroku app.

I think Git thinks the remote branch is on an old commit, therefore making the files count too large when it really shouldn't be. I think something is wrong with the tracking.

I tried to call "git fetch" but nothing refreshed. It seems like some of my previous "git push" calls updated the app, but not the remote branch.

Is there any solution to that? Maybe an online visual of the remote Heroku branch?

Thanks!

Upvotes: 1

Views: 40

Answers (1)

VonC
VonC

Reputation: 1324308

However, I am 100% sure that I pushed the presumably unpushed commits, and I am also sure the files are present in the Heroku app.

If you don't have any current local changes, you could simply reset your local master branch to hekoku/master

git reset --hard heroku/master

I would recommend doing a backup of your current repo first.
Or simply re-clone the heroku repository and go from that new local clone.


The OP adds in the comments:

It seems like:

Upvotes: 1

Related Questions