第一次連結遠端庫
$ 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