git push -u origin master报错.
To https://gitee.com/cn_xxxxx/node.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/cn_xxxxx/node.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.
解决:
解决:需要拉取远程仓库的项目合并到本地仓库
git pull origin master
3、git pull origin master报错
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
解决:git pull origin master --allow-unrelated-histories
clone 下来的的项目如果要提交到自己的库中,需要将clone项目的中的.git文件删除
在将clone下来的项目提交到本地库中在推到远程库里面。