After getting changes from a different branch using rebase, I'm trying to push the new changes to a remote private branch and I'm getting the following message
Push of the current branch XXXX was rejected. Remotes changes needs to be merged before pushing. In this case merge is highly recommended, because there are non pushed merge commits. Rebasing them can lead to problems.
Can you please explain more about this problem? If I'm using my own personal branch can I force push to it without a worry?
git push -f ...
if you indeed want to rewrite it. – Athapaskangit push --force
in this case. Note that if this branch is your own private one, then there is nothing wrong with doing a force push. – Mantic