git把任意代码提交到已存在的github库中

git init
git add .
git commit -m "init"
git remote add origin 远程url

git push --set-upstream origin master
git branch --set-upstream-to=origin/master
 
git pull --allow-unrelated-histories


-- git pull --rebase origin master
原文地址:https://www.cnblogs.com/gaocong/p/6758406.html