git 新手踩坑之路

git 新手踩坑之路

程序新手 最近在用vue做项目 难免会用到码云或者github 从此走上了一条不归路。

改完代码兴高采烈的推上去结果报错了

fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push –set-upstream origin master

本来以为是分支的问题 但是运行git push –set-upstream origin master 又报出
fatal: unable to access ‘XXX Failed to connect to gitee.com port 443: Timed out的错误 额 快被整疯掉了
最后找到原因是 项目下载的时候直接在本地git init 没有git pull -f –all 导致的本地readme文件和github上的readme文件版本不一样。然后运行

git push -u origin master -f

问题就被解决了

ps:不知道写的有没有问题 欢迎大神来评论

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章