赞
踩
git init
初始化git add .
全部提交git commit -m'提交说明备注'
将暂存区代码提交至本地仓库git remote add origin + 远程仓库地址
绑定远程仓库git remote -v
查看远程库信息git push -u origin master
推送(1)
若报错:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/he-yuSB/bfd-front.git'
参考文章:https://cloud.tencent.com/developer/article/1782118
解决方法:git pull --rebase origin master
即可跟刚创建的线上远程仓库的默认分支master关联
(2)
若仍然报错:
$ git push -u origin master
To https://gitee.com/he-yuSB/bfd-front.git
! [rejected] master -> master (non-fast-forward)
参考文章:https://blog.csdn.net/m0_37806112/article/details/82289606
解决方法:git push -f
强制推送(覆盖)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。