git实现本地仓库与GitHub的连接--只提供一种方式
1. 本地新增项目
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://XXX.git 仓库地址
git push -u origin master
git remote add origin https://XXX.git
git push -u origin master
2.遇到问题,fatal: refusing to merge unrelated histories
可以在pull命令后紧接--allow-unrelated-history
选项来解决问题
$git pull origin master --allow-unrelated-histories