git 初始化
2017-12-20 本文已影响10人
问问问你
echo "# 111" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/monekyDluffy/111.git
git push -u origin master
问题
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:asantoya/projectnewbies.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
使用
git push -f origin master