Blogger Information
Blog 33
fans 0
comment 2
visits 37333
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
github 常见的问题 fatal: refusing to merge unrelated histories
cxw的博客
Original
1072 people have browsed it

在github 中安装遇到的问题

解决方法,在操作后面加:

—allow-unrelated-histories

git pull git@gitlab.com:xxx.git master —allow-unrelated-histories

常用操做
git init 创建本地文件夹中git 文件
cd D: 找到需要上传的文件所在位置
git add ./index.txt 找到需要提交的文件,并指定提交哪些,(总共/指定文件)
git commit -m “备注” 将本地的文件提交到缓冲区

主要是因为本地仓库中缺少README这个文件。

解决办法:第一步:git pull —rebase origin master

将github中的README文件下到本地仓库中。

第二步:git push -u origin master即可完成代码上传到github

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post