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,这样就可以这样解决冲突的工程文件啦。如图所示:
Git中的merge命令实现中出现问题及其解决的更多相关文章
- Git中的merge命令实现和工作方式
想象一下有例如以下情形:代码库中存在两个分支,而且每一个分支都进行了改动.最后你想要将当中的一个分支合并到其它的分支中.个人博客网址 http://swinghu.github.com/ 那么要问合并 ...
- mysql中如何在命令行中,执行一个SQL脚本文件?
需求描述: 在mysql数据库的使用中,有的时候,需要直接在shell的命令行中,执行某个SQL脚本文件, 比如,要初始化数据库,创建特定的存储过程,创建表等操作,这里进行一个基本的测试. 一般情况, ...
- git can't merge 的处理 代码冲突问题的解决
***取回已经提交的代码 git reset HEAD^ git can't merge 的处理1.git status 确保status 为空,可以先提交2.git reset HEAD^ 取 ...
- linux中没有tree命令,command not found,解决办法
在有网络的情况下: 1.包管理器安装 centos 中用 yum -y install tree ubuntu 中用 apt-get install tree 当然如果需要权限不要忘了在前面加上 ...
- 【转】Linux中history历史命令使用方法详解
原文网址:http://os.51cto.com/art/201205/335040.htm 当你在玩Linux的时候,如果你经常使用命令行来控制你的Linux系统,那么有效地使用命令历史机制将会使效 ...
- Linux中history历史命令使用方法详解
当你在玩Linux的时候,如果你经常使用命令行来控制你的Linux系统,那么有效地使用命令历史机制将会使效率获得极大提升.事实上,一旦你掌 握了我在下面给出的15个有关Linux history历史命 ...
- pycharm中可以运行的程序,在命令行中运行提示模块不存在的问题
运行模块(包含main函数的模块),在模块开头添加以下代码,原因是pycharm运行python脚本时,会自动添加以下代码,将当前库加入到系统库目录集合中,在命令行中运行需要手动添加import os ...
- Git知识总览(五) Git中的merge、rebase、cherry-pick以及交互式rebase
上篇博客聊了<git分支管理之rebase 以及 cherry-pick相关操作>本篇博客我们就以Learning Git中的关卡进行展开.下方列举了LearningGit中的 merge ...
- Git 日常工作中使用的命令记录
前言 这篇文章主要是介绍我在使用Git中的有一些忘记了,但是很重要的命令. 20190424 Git 历史信息 username 和 email 更改 git config alias.chang ...
随机推荐
- javaWEB总结(16):jsp错误页面的处理
前言 网站上线后,jsp页面上有时会出现不友好的错误信息,我们需要展示给用户更加友好的页面.这时候要用到page标签的errorPage和isErrorPage. errorPage 指定当前页面出现 ...
- gRPC编码初探(java)
背景:gRPC是一个高性能.通用的开源RPC框架,其由Google主要面向移动应用开发并基于HTTP/2协议标准而设计,基于ProtoBuf(Protocol Buffers)序列化协议开发,且支持众 ...
- 百度用AR复现朝阳门,野心渐明直指AR平台
近日,支付宝推出基于"AR+LBS"的AR实景红包后,BAT的另一个巨头百度也忍不住展示了自家AR技术.12月22日上午11点,百度邀请了一众媒体朋友前往朝阳门地铁站F口,体验期最 ...
- ajax成功案例
$.ajax({ type:"post", url:"<%=basePath%>getAllVersion", dataType:"jso ...
- 使用EasyBCD 从硬盘安装 deepin2014.1
EasyBCD config code: title Install Deepin2014 root (hd0,1) kernel (hd0,1)/vmlinuz boot=casper iso-s ...
- Markdown 基础
How to use Markdown H1 text. H2 text. H3 text. H4 text. H5 text. H6 text. Text This is italic text. ...
- 简单的Socket通信
Socket简介 Socket又称"套接字",应用程序通常通过"套接字"向网络发出请求或者应答网络请求. 服务端步骤: • socket:创建服务器socket ...
- HDU 2216 Game III(BFS)
Game III Problem Description Zjt and Sara will take part in a game, named Game III. Zjt and Sara wil ...
- ckeditor 插件
dialog 下面 建立一个 插件.js CKEDITOR.dialog.add("about", function (a) { var aaa = "<form& ...
- MC- 挂单STOP交易
using System; using System.Drawing; using System.Linq; using PowerLanguage.Function; using ATCenterP ...