zoukankan      html  css  js  c++  java
  • Git中的merge命令实现中出现问题及其解决

    Git中的merge命令实现和工作方式

    2015年8月17日星期一

    丹丹

    git代码在合并两个分支的时候总是会出现一下的错误提示,不能正常的完成合并分支,错误提示如图所示:

     

    但是在其他的终端是可以完成合并任务的,所以是本地iMac的环境问题,推测原因一:.ignore文件的问题,推测原因二:是Xcode的问题。

    针对可能原因二:

    链接:

    http://stackoverflow.com/questions/14605231/git-merge-branch-into-master

    按照参考文件在终端进行操作,但是仍旧会有这样的错误提示:

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git checkout master

    M homezxb-3.8.0/homezxb.xcodeproj/project.xcworkspace/xcuserdata/qiaodandan.xcuserdatad/UserInterfaceState.xcuserstate

    Already on 'master'

    Your branch is up-to-date with 'origin/master'.

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git merge Branch1104

    Updating 995534b..abd7343

    error: Your local changes to the following files would be overwritten by merge:

    homezxb-3.8.0/homezxb.xcodeproj/project.xcworkspace/xcuserdata/qiaodandan.xcuserdatad/UserInterfaceState.xcuserstate

    Please, commit your changes or stash them before you can merge.

    Aborting

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git commit -m "提交"

    On branch master

    Your branch is up-to-date with 'origin/master'.

    Changes not staged for commit:

        modified:   homezxb-3.8.0/homezxb.xcodeproj/project.xcworkspace/xcuserdata/qiaodandan.xcuserdatad/UserInterfaceState.xcuserstate

     

    no changes added to commit

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git push

    ssh: connect to host 192.168.221.11 port 22: Operation timed out

    fatal: Could not read from remote repository.

     

    Please make sure you have the correct access rights

    and the repository exists.

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git push

    Everything up-to-date

    QiaoDandandeiMac:teamworkTwo qiaodandan$ git merge Branch1104

    Updating 995534b..abd7343

    error: Your local changes to the following files would be overwritten by merge:

    homezxb-3.8.0/homezxb.xcodeproj/project.xcworkspace/xcuserdata/qiaodandan.xcuserdatad/UserInterfaceState.xcuserstate

    Please, commit your changes or stash them before you can merge.

    Aborting

    QiaoDandandeiMac:teamworkTwo qiaodandan$

    如何解决???

    在终端出现的问题,在sourceTree中完美解决,发生冲突之后,在sourceTree中去选项目文件即可完成合并代码,并且成功提交代码。体现了sourceTree和终端的完美结合,解决步骤:

    在sourceTree中拖拽好本地文件之后,就配置好了sourceTree,这样就可以这样解决冲突的工程文件啦。如图所示:

     

  • 相关阅读:
    drug targets | genetic | 遗传 | 药物靶点
    Cistrome数据库挖掘转录因子靶基因 | TF | target
    Gene-Regulatory Networks (GRNs) | 进阶分析
    PTBP1 | Polypyrimidine Tract Binding Protein | 聚嘧啶区结合蛋白 | 关键调控因子
    HDAC1 | histone deacetylases | 组蛋白脱乙酰基酶 | 关键调控因子
    免疫反应 | Immune Response
    干细胞疗法 | 抗衰老
    生物信息ID大全 | rsid | Ensembl | HGNC | Entrez | Refseq | Uniprot | OMIM
    (转)解药 | AI发现一罕见病新靶点 投资界谨慎乐观
    genome browser | ggplot | 基因组可视化 | R | transcript | isoform
  • 原文地址:https://www.cnblogs.com/Jordandan/p/4742198.html
Copyright © 2011-2022 走看看