Git does not send commits to server. Error: Everything up-to-date

Asked

Viewed 22,077 times

5

When giving the command: git push origin master git does not send the information and gives the following error:

Everything up-to-date

I realized that the master of my local repository is not pointing to the last commit, as can be seen in the image below: inserir a descrição da imagem aqui

How can I fix this? Thank you!

  • Is there a more current branch? Try to push this branch.

  • No, it’s just the same Master branch. The point is that I had reversed a commit and then continued to work on the master and do other commits. However when I went to send to Bitbucket gave this error.

  • If you are absolutely sure that your branch is in front of the bitbucket, I would try git push -f origin master.

  • If you look at the master branch (local) and the remotes/origin/master (which is Bitbucket) are right behind my current commit. For lack of knowledge, I did a reset and then continued to commit, only then saw the problem. yamadapc, so I understand this command forces you to send, right? But what happens is that what is in Bitbucket is the same as what is in my branck master (or, wherever it is pointing), as can be seen in the image. What I need to do is point this master(local) to the most current commit and then I can send it with git push

2 answers

4


I decided here as follows:

git reset --hard [sua branch]
git add .
git commit -m "...blablabla"
git push origin [sua branch]

Thank you all for your help! Hug!

2

The problem was that the git add -A was not working, using git add *nome do arquivo* and committing he managed to give push.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.