[reprinted]( http://blog.csdn.net/chenshun123/article/details/46756087 )
When you push to the server, sometimes there will be a rejected – non fast forward error. This is because the code of the pull has changed at the remote end. At this time, you need to merge the changes at the remote end into the local before submitting again
Here’s the solution:
1> Open git repositories and make sure that you can see the project to be submitted in the working directory
2> In remotes, you can see the remote branch. The green arrow icon to the left under the branch represents fetch. Right click – > Configure Fetch
3> Confirm that the URI and ref mappings are correct, click save and fetch, and then you can see the fetch results branch together. Click OK
4> At this time, you should see that there is a remote branch in remote tracking in branches
5> Right click master in local in branches and select merge
6. Select origin/Master in remote tracking and click merge
7. This is the feedback result of the merge, after which you can submit the code again
</div>
</div>
Similar Posts:
- A rejected – non fast forward error occurred in eclipse push
- Git pull does not specify an error message for the branch
- Git Unable to switch remote branches error: pathspec ‘origin/XXXX’ did not match any file(s) known to git
- Git Pull Error: Please specify which branch you want to merge with.
- Conflict resolution after git error non fast forward
- Git Error: nothing to commit, working directory clean [How to Solve]
- git pull There is no tracking information for the current branch.
- [Solved] Git pull fatal: refusing to merge unrelated histories
- Git clone download code prompts that the file pointed to by head does not exist