I am having the following problem trying to push a project on GIT.
Pushing it I obtain this error message:
$ git push origin master
To https://bitbucket.org/MyAccount/my-project.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://MyAccount@bitbucket.org/MyAccount/my-projec.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
So it seems, correct me if I am doing wrong assertion, that on my remote repository there are changes that I have not taken in my local repository and it suggest me to perform a pull to obtain these changes.
This is a problem for me because the local version is the last definitive version of my application and I can not risk it to overwrite something taking something old and wrong (or made by someoneelse) from the remote repository.
Can I specify to push the local content without taking into account the remote changes? Or how can I check the difference between my last local commit and the remote content?