问题描述:! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/码云仓库名'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
错误原因其实是我本地没有README.md这个文件,而远程仓库中有
git pull --rebase origin master
执行完后会发现本地已经有了 README.md 这个文件!
当时建仓库时有这个选项点了,哈哈。
现在想想是不是很好奇???
!!!记得对比才能发现问题!
然后上传
git push -u origin master
或点push.
然后登录码云,找到你上传的仓库,会在所在码云仓库上看到你上传的代码。