git上传文件夹报错: ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/taminachen/rjxm.git' hint: Updates were rejected because the remote contains work

Use git upload a local folder to a remote repository, use the following command: being given git push -u origin master

The reason is created when the GitHub repository create a readme file, but this is not a local file, resulting in a local directory with a remote directory inconsistencies.

Workaround: Use the command git pull --rebase origin master merge

Upload it again, success!

 

Guess you like

Origin www.cnblogs.com/qilin20/p/10935970.html
Recommended