解决git同步失败

1, vscode同步失败,因为远程仓库中有README文件,而本地项目中没有导致失败,需要在本地项目生成该文件

git pull --rebase origin master  //本地生成ReadMe文件

git push origin master

解决问题网址:https://www.cnblogs.com/qingheshiguang/p/14777557.html

提交代码到仓库命令

  1. git init 初始化
  2. git status 查看状态
  3. git add .
  4. git commit -m "xxxxxx"
  5. git remote add origin GitHub - ai228/c_server: 使用C语言编写的TCP通信服务端 添加到远程仓库
  6. git pull 拉取远程仓库到本地
  7. git push -u origin master 提交代码

Git在push推送时,报错提示信息如下:

hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

————————————————

版权声明:本文为CSDN博主「幕尘枫」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:Git错误提示Integrate the remote changes...的解决方法_its remote counterpart. integrate the remote chang_幕尘枫的博客-CSDN博客

1、先使用pull命令:

git pull --rebase origin master

2、再使用push命令:

git push -u origin master

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值