When push is executed, an error will be reported. The error code is as follows:
$ git push -u origin master
To gitee.com:backspacegit/aafdajs.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'gitee.com:backspacegit/aafdajs.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
This problem occurs because the readme.md file in GitHub is not in the local code directory. You can merge the code with the following command
git pull --rebase origin master
Then execute the statement
git push -u origin master
Done!
Read More:
- [Solved] Git push error: failed to push some refs to ‘[email protected]:daisy_yangyang/fed-e-task-04-01.git‘
- Push to origin/Master was rejected [How to Solve]
- [Git] Solve git branch -M main error: refname refs/heads/master not found
- How to Solve gtid master-slave replication connecting Issue
- Initializing the Kubernetes master node ERROR: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0
- How to Solve Ubuntu “Failed to fetch” Error
- Using common file upload to upload files in SSH project
- [Solved] rs_to_velodyne-master compile Error: POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature
- Git Push Error: error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
- How to Solve Git clone Error: error: RPC failed; result=35, HTTP code = 0
- [Solved] minio Failed to Upload File Error: The difference between the request time and the server‘s time is too large.
- [Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443
- [How to Solve] Git Push stuck in ‘writing objects’
- Git initializes the local existing project
- [Ubuntu] How to Solve dpkg Error: dpkg: error: failed to open package info file ‘/usr/local/var/lib/dpkg/status’ for reading: No such file or directory
- AFTER THE GIT SOURCE CODE IS INSTALLED, AN ERROR IS REPORTED /USR/BIN/GIT: NO SUCH FILE OR DIRECTORY
- Git commit – M ‘upload submit times error command “husky run” not found.
- ros2 apt-get install error: E: Failed to fetch http://packages.ros.org…
- How to Solve Git Filename too long Error
- Git Error Resolution: errno:10054 Time out