I have cloned a remote non-bare main repo to my computer. Then I made some changes and updated my local repo. I also made a change in the remote repo but then I realized that I didn't need to, so I tried to git push from my local repo to my remote repo, but I got an error like:
To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes before pushing again. See the 'Note about fast-forwards' section of git push --help for details.
Then I tried:
git push --force
I thought that this would force my local copy to push changes to the remote one and make it the same. But when I g to the remote repo and make a commit, I notice that the files contain outdated changes.
How can I fix this issue?