There is an error in pushing from the local warehouse to the remote warehouse (rejected) because the code of the remote warehouse has been modified directly in the remote warehouse. At this time, the code of the local warehouse is different from that of the remote warehouse, so you must update the code of the local warehouse (Pull) first and then submit (push)
Error log in idea for this problem:
error log in Git bash:
at this time, you can only pull to update your local warehouse and then push to the remote warehouse, but you will find that you will also report an error when you pull to the local warehouse
at this time, your pull command should be changed to the following command, That is, just add a parameter to ignore the history (because the two branches are caused by different versions)
git pull origin master --allow-unrelated-histories
Read More:
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- Git Push Error: failed to push some refs to ‘[email protected]:
- Git Push Error: error: failed to push some refs… hint: Updates were rejected because the remote…
- [Solved] error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘
- How to Solve Git Error: error: failed to push some refs to……
- [Solved] Remote URL test failed: Could not read from remote repository.
- [Solved] Git Common Error: error: src refspec xxx does not match any/error: failed to push some refs to
- Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“
- [Solved] Mavenwas cached in the local repository
- [Solved] Git Push Error: &fatal: the remote end hung up unexpectedly
- Git Error: refusing to merge unrelated histories [How to Solve]
- hint: Updates were rejected because the remote contains work that you do To XXX
- [Solved] Git Error: fatal: refusing to merge unrelated histories
- Git Push remote error: GH007: Your push would publish a private email address.
- [Solved] Git Error: fatal: refusing to merge unrelated histories
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- Git Pull error: Your local changes to the following files would be overwritten by merge:
- How to Solve Git Push Error: error: src refspec v3.3.04.1000 matches more than one
- [Solved] Git push Error: remote: Support for password authentication was removed on August 13, 2021.
- Git push Failed to connect to localhost port 1080 [How to Solve]