Try this. It will work nicely.
git pull origin --rebase
After you get the non-fast-forward error, just do below :
git pull --rebase origin <name-of-the-remote-branch>
This will fetch the remote changes to your local branch. On top of that, it will apply your local commits.
Then
git push origin <name-of-the-remote-branch>
…
Top comments (0)