1.提交本地代码到github仓库
可以参考这篇博客:https://blog.csdn.net/CHENYUFENG1991/article/details/48930471
2.执行 git pull origin master时,报错:fatal: refusing to merge unrelated histories
解决办法可以参考这篇博客:https://blog.csdn.net/m0_37402140/article/details/72801372
3.如果执行:git pull origin master --allow-unrelated-histories报错:fatal: Couldn’t find remote ref master
可以分情况解决:如果是新仓库,可以直接跳过这个问题,直接执行后面的git push -u origin master向github上的master分支提交代码
如果不是新仓库:可以参考这篇文章去解决:https://blog.csdn.net/qq1171574843/article/details/88971148
github常见问题和命令汇总,可以参考这篇文章:https://www.cnblogs.com/TaylorApril/p/6815142.html