git向远程库推送文件的问题
2016-05-03 17:39
225 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/fangxuu/article/details/51306425
1.输入:git push -u origin master
错误信息:.Permanently added the RSA host key for IP address 'XXXXXXX' to the list of known hosts.
按照提示信息将IP加入到etc/hosts文件里面就行。
2.输入:$ Git remote add origin git@github.com:gitaccount/gitdemo.git
出错信息:fatal: remote origin already exists.
解决办法:输入: $ git remote rm origin
3.输入:$ git push -u origin master
出错信息: ! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:fangxuu/learngit.git'
hint: Updates were rejected because the remote contains work that you do
解决办法:输入:$ git pull --rebase origin master
按照出错提示用git pull命令即可。出现这个问题应该是我先在github上建立了仓库,再在本地建立仓库,这样github上的readme.md文件没有同步到本地。
好了,第一次添加远程库遇到的三个问题先写下来
输入:git push -u origin master
推送成功!有点开心。
相关文章推荐
- git笔记之解决eclipse不能提交jar等文件的问题
- git笔记之解决eclipse不能提交jar等文件的问题
- gitignore文件中添加新过滤文件,但是此文件已经提交到远程库,如何解决?
- 解决一个小问题:git下载Kernel源码时只有.git\objects\pack目录下的.pack文件,而没有自动提取
- Git进行版本控制添加文件时,中文文件名乱码显示数字问题
- git推送问题解决
- windows 安装git并上传本地项目到远程库碰到的问题
- 【Git学习笔记】删除文件及文件夹,并push到远程库
- 通过gitcheckout到本地然后通过pod添加框架后出现.h文件找不到问题的解决办法
- git推送不上的问题解决新思路!
- git解决eclipse不能提交jar等文件的问题
- IOS-AppStore上架审核 推送问题上传二进制文件被拒
- git push 推送大文件失败的处理办法
- 关于git提交文件结尾问题的介绍
- Ubuntu16.04 git连接远程库出现推送错误问题的解决方法
- 【Git学习笔记】GitHub中创建仓库,将本地仓库推送到远程库
- git .gitignore 文件 解决二进制文件冲突问题
- 如何使用git推送本地文件到github
- git推送文件至github缺少README文件
- git笔记之解决eclipse不能提交jar等文件的问题