美文网首页
git 使用中遇到的错误

git 使用中遇到的错误

作者: 春阳_fc96 | 来源:发表于2019-01-16 11:32 被阅读0次

1. git push 遇到 master branch has no upstream branch

原因:没有将本地的分支与远程仓库的分支进行关联。

解决:1. git push --set-upstream origin master

            2. git push -u origin master

2. git pull 遇到 There is no tracking information for the current branch.

原因:当前分支未找到跟踪

解决:git pull origin master

3. git pull origin master 遇到 refusing to merge unrelated histories

原因:拒绝合并不相关的历史。这是因为两个分支没有取得关系,多数为本地直接关联远程库而不是clone下来

解决:git pull origin master --allow-unrelated-histories

4. git pull 遇到 Automatic merge failed; fix conflicts and then commit the result.

原因:多人协作修改同一文件导致代码冲突。

解决:如果是需要远程的代码 $:git reset --hard origin

            需要本地的代码,本地查看冲突的部分,处理完成后,重新 add 并执行上传流程

5. iOS git提交时忽略更新的UserInterfaceState.xcuserstate文件

git rm --cached xxx.xcworkspace/xcuserdata/xxx.xcuserdatad/UserInterfaceState.xcuserstate

git commit -m"remove UserInterfaceState.xcuserstate"

git push

相关文章

  • git 使用中遇到的错误

    1. git push 遇到master branch has no upstream branch 原因:没有将...

  • Git submodule 采坑

    Git submodule 采坑 使用git submodule update --init 时遇到错误:erro...

  • git pull时遇到error: cannot lock re

    在执行git pull时遇到如下错误: 遇到这个错误会导致git pull失败。 问题原因 这个git工程的.gi...

  • git ssh中config配置代理

    使用git clone git@xxxx项目时,ssh方式;出现如下错误: 我遇到的问题主要时连接不上gitLab...

  • git 使用日记

    第一次使用git填的一些坑 在刚开始安装好git使用git clone命令时就遇到一个坑,错误见下图 这是因为没有...

  • git遇到的错误

    1、Could not open file .git/rebase-merge/done for reading:...

  • LibreSSL SSL_connect: SSL_ERROR_

    这周在使用git的时候遇到了如标题所示的错误,上网一搜都是说git的代理问题,每次我遇到的问题都能成功绕过这些解决...

  • git: port 9418错误

    yarn遇到git错误 The unauthenticated git protocol on port 9418...

  • Git 使用笔记

    git pull 问题 今天在使用git pull拉取远程库版本时,出现如下错误: 按照错误提示,使用git pu...

  • Git使用中git pull出现错误

    Ubuntu18下Git使用命令git pull出现错误信息:fatal: unable to access 'h...

网友评论

      本文标题:git 使用中遇到的错误

      本文链接:https://www.haomeiwen.com/subject/mpnpdqtx.html