第一次链接远程库
$ git push -u origin master
To https://github.com/rongwuChina/nodejs.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/rongwuChina/nodejs.git’
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes
在第一次链接远程库,使用git push的时候出现下面的错误
由于线上和线下属于两套版本库,所以报错。使用–allow-unrelated-histories将线上和线下库进行强连接即可,具体命令如下
git push -u origin master --allow-unrelated-histories