0

"The tip of your current branch is behind its remote counterpart" means that there have been changes on the remote branch that you don’t have locally. And Git tells you to import new changes from REMOTE and merge it with your code and then push it to remote.

However, I have tried everything and get the message that everything is up to date

Though I am not able to do push to Heroku with an update anymore as I keep getting the message:

Git Updates were rejected because the tip of your current branch is behind

I tried git push --force origin main

Tried pulling and merging

Even did a hard reset but absolutely nothing works and I need to deploy the API changes to Heroku but to no avail. Can anyone help me get unstuck please?

1 Answers1

0

Check if you have multiple remote repositories declared in your local project, with:

git remote -v

And look at the graph of commits in order to visually see those remote commits that you might not have locally:

git log --decorate --graph --oneline --all --branches

That way, you will know which remote/branch you need to reset to.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250