博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于git的一些操作
阅读量:6888 次
发布时间:2019-06-27

本文共 842 字,大约阅读时间需要 2 分钟。

今天上传github时遇到了不少的小问题

1.上传了新内容,新内容多了个文件想要删除

执行如下命令:

2.删除后,要上传github更新,遇到了如下问题

$ git push -u origin masterTo https://github.com/biyeee/ZL_spider.git ! [rejected]        master -> master (fetch first)error: failed to push some refs to 'https://github.com/biyeee/ZL_spider.git'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.

百度了一下,是因为我在第一次上传时没有创建README.me文件,而在github上创建了,导致github与本地仓库不同步无法上传

解决办法:

1.git pull 先把github上的文件取回本地

2. git commit -m '操作说明' 更新本地仓库

3.git push -u origin master 再执行上传代码

成功!!!

 

转载于:https://www.cnblogs.com/biyeee/p/9355362.html

你可能感兴趣的文章
微软翻译api的使用介绍和注意事项
查看>>
推荐一本很不错的前端书
查看>>
mysql 查询 表字段, 类型、长度、是否为空、描述
查看>>
拓扑排序
查看>>
利用函数的递归计算数字的阶乘
查看>>
iOS核心动画以及UIView动画的介绍
查看>>
linux 学习10 shell 基础
查看>>
2015.10.14-TransactionScope测试
查看>>
HTML中id、name、class 区别
查看>>
Codeforces Round #442 (Div. 2) E Danil and a Part-time Job (dfs序加上一个线段树区间修改查询)...
查看>>
deeplab算法解析
查看>>
array_column()函数兼容低版本
查看>>
Redis配置sentinel模式
查看>>
Web文件管理:elFinder.Net(支持FTP)
查看>>
IDEA快捷键复习使用
查看>>
#001 为知笔记,测试发布到博客园
查看>>
textarea实现高度自适应
查看>>
forfiles
查看>>
基于python的web编程基础
查看>>
nginx之Geoip读取地域信息模块
查看>>