赞
踩
今天打开CSDN,看到评论想要参考我的代码,以前都是回复说留下联系方式
已经好几次了
之前尝试过多次使用开源平台,没有成功
于是今天想起使用码云平台,再次尝试了一次
成功将自己的代码上传到自己的开源账号
这是成功创建后的51单片机开源链接
git init //初始化仓库
git add . (git add (文件name)) //添加文件夹中所有文件到本地暂存
git commit -m "first commit" //添加文件描述信息
git remote add origin 远程仓库地址 //链接远程仓库
git push -u origin "master" //把本地仓库的文件推送到远程仓master
git push -u origin "master"
在使用上述命令时出现问题
经过有道翻译后,知晓原因 于是寻找解决方法
使用下面一行,很好的解决问题
git pull origin master --allow-unrelated-histories
再次推送,成功推送
git push -u origin "master"
Git 报错 Updates were rejected because the remote contains work that you do
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。