windows使用git时会出现的常见操作问题解答
来源:互联网 发布:virtualbox mac 10.13 编辑:程序博客网 时间:2024/05/29 16:26
终于稍微会一点git了,所以赶紧把遇到的问题记录下来:
1、warning: LF will be replaced by CRLF
windows中的换行符为 CRLF, 而在Linux下的换行符为LF,所以在执行add . 时出现提示,解决办法:
$ rm -rf .git // 删除.git $ git config --global core.autocrlf false //禁用自动转换
然后重新执行:
$ git init $ git add .
2、fatal: remote origin already exists
输入$ git remote add origin 项目地址时出现出错信息;
解决办法:
$ git remote rm origin$ git remote add origin
然后再输入项目地址 就不会报错了。
3、error:failed to push som refs to …….
输入$ git push origin master时出现出错信息;
解决方法:
$ git pull origin master //先把远程服务器github上面的文件拉下来$ git push origin master
4、 fatal: Couldn’t find remote ref master或者fatal: ‘origin’ does not appear to be a git repository以及fatal: Could not read from remote repository.
重新输入
$ git remote add origin 项目地址
5、error:src refspec master does not match any
引起该错误的原因是,目录中没有文件,空目录是不能提交上去的;
touch READMEgit add README git commit -m 'first commit'git push origin master
0 0
- windows使用git时会出现的常见操作问题解答
- Zabbix常见的问题解答
- git的常见操作
- 29个常见的使用Linux系统问题解答
- 使用WLAN出现常见故障问题解答
- 关于windows上git的使用操作
- 使用PHP下载Excel时会出现乱码的解决方法
- Glide使用占位图时会出现的问题
- git常见的几个操作
- 在修改C:\windows\system32\drivers\etc\hosts文件时会出现警告的对话框的解决方案
- 常见的AS/400 FTP问题解答
- Hadoop常见的45个问题解答记录
- Android开发中常见的问题解答
- win7的本本,在安装东西时会出现无法访问windows install服务,怎么办?
- mysql数据库多个表操作时有时会出现事物不一致的问题
- Windows上使用Git前需要进行的操作
- Windows上使用Git前需要进行的操作
- Git 常见命令的使用
- Shell中配置环境变量
- android 获取以太网的连接状态
- 删除数组指定的元素(难度:半颗星)
- Android开发常用开源框架:图片处理
- OpenCV计算连通区域数目与最大连通区域并标示出
- windows使用git时会出现的常见操作问题解答
- c++实验5—数组分离
- 我用四天的时间写了四行代码
- Spring Boot参考文档(11)运行你的应用
- LinkedHashMap<K,V>的用法
- 生成元
- 5.偏头痛杨的Java入门教学系列之流程控制语句篇
- nyoj 47 过河问题
- 取石子