Http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/ 0013752340242354807e192f02a44359908df8a5643103a000
Local and remote GitHub associated
Now create a new git repository locally
Git init
Associated with remote
Git remote add Origin xxx.git
Push local files to remote
Git push-u Origin Master
There's a problem here.
To Https://github.com/HelloKing/Professional-JavaScript-3.git
! [Rejected] Master--master (fetch first)
Error:failed to push some refs to ' https://github.com/HelloKing/Professional-Ja
Vascript-3.git '
Hint:updates were rejected because the remote contains work the
Hint:not has locally. This was usually caused by another repository pushing
Hint:to the same ref. Want to first integrate the remote changes
Hint: (e.g., ' git pull ... ') before pushing again.
Hint:see the ' Note about Fast-forwards ' "Git push--help ' for details.
The reason is that when you add a read.me file to a new project on GitHub, the remote repository has files that do not exist in the local repository, so you need to consolidate remote changes
http://blog.csdn.net/ispeller/article/details/22183961
Solution Solutions
Git pull Origin master (git pull) instruction learning
git commit file
Then proceed to push
Git push-u Origin Master
Git learning Notes (iv)