windows 安装git并上传本地项目到远程库碰到的问题
来源:互联网 发布:运营书籍 知乎 编辑:程序博客网 时间:2024/06/06 09:12
看到很多公司都是用git管理自己的项目,我们公司也是,不过用的是eclipse工具,但我想应该要掌握git的bash使用和命令用法,所以我今天就抽空自己去尝试了使用git上传项目
,根据网上查找的博客去安装、上传,期间碰到一些问题,就记录下来,以备以后再次碰到查看,也希望可以给大家带来帮助。
第一个问题:git上传下载文件是需要ssh加密的,所以必须要安装ssh。安装好后,还要在GitHub上创建ssh key,把本地生成的 .ssh目录下 id_ras.pub文件内容拷贝到GitHub的ssh key中。
第二个问题:在上传到远程库的时候碰到问题:
$ git push -u origin master
To github.com:**************.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:*************git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
这个问题具体原因不知道,加上--allow-unrelated-histories
就可以了,即 git push origin master--allow-unrelated-histories
- windows 安装git并上传本地项目到远程库碰到的问题
- Git上传本地项目到远程仓库
- AndroidStudio--Git--本地项目添加Git并初次上传到远程Git
- AndroidStudio--Git--本地项目添加Git并初次上传到远程Git
- 把项目从本地上传到git远程库
- VS将本地的项目使用git上传到远程存储库
- git上传本地项目到远程git仓库(码云)
- 使用git将本地项目上传到git远程仓库
- GIT 把本地项目上传到远程项目
- Git 创建本地仓库并上传到远程仓库
- git创建本地仓库并上传到远程仓库
- 用命令将本地项目上传到git 远程仓库
- git上传本地项目到远程github仓库
- Git上传项目至远程仓库与同步到本地
- GitHub本地上传项目到远程库的基本流程
- (Git的应用)本地库项目上传到github
- eclipse git上传项目到远程库
- 上传本地项目到git
- linux下C语言实现睡眠理法师问题
- 存储过程
- centos 安装mongodb3.0
- iOS 多语言版本的开发(二)
- 使用gitbook发表文章和书的正确姿势
- windows 安装git并上传本地项目到远程库碰到的问题
- 到底有多强?苹果的增强现实框架:ARKit
- Eclipse启动时间插件(解决不能弹出问题)
- Mysql 存在既更新,不存在就添加(sql语句)
- 关于spinner嵌套在popupWindow冲突问题
- EasyUI 输入框下拉框 提示语【EasyUI注意点】
- dubbokeeper部署
- 再次折腾-启动hadoop时遇到问题
- python 安装库 方法 例子:安装opencv