How to Solve [rejected] Master – > Master (non fast forward) error

[rejected] Master -> Master (non fast forward) error solution

1. Cause analysis

It roughly means that the local library and remote library are not synchronized, so the merge cannot be submitted, and the conflict leads to the failure to push

2. Solution

Then it’s easy to find the reason. Just synchronize the local library with the remote library

git pull origin main --allow-unrelated-histories //Pull the unrelated history from the remote repository
git push origin main //push to the remote main branch

Similar Posts: