On trying to merge two git branches, I’ve often found Xcode 4 displays “Branches not found” in the Merge dialog, despite the Organiser clearly recognising multiple branches for the repo.
It seems the problem occurs because Xcode believes the working copy has uncommitted changes (even though the Commit dialog clearly shows there’s nothing to commit). The reason is that Xcode 4 doesn’t instruct git to ignore system invisible files, specifically .DS_Store (see rdar://8951416).
Turns out the workaround isn’t hard, just create a global excludes file:
git config --global core.excludesfile ~/.gitignore
… and ensure .DS_Store is ignored:
echo .DS_Store >> ~/.gitignore
Xcode will then allow you to merge branches or perform any other operation that was being prevented because it incorrectly thought there was something to commit.
分享到:
相关推荐
asepsis, ds_store污染的解决方案 污染的无菌==解决方案。警告:在 OS X 10.11下不再支持( El Capitan )请访问终端用户信息。从源代码安装你将需要Xcode5来从源代码构建它:git clone https://github.com/b
*.DS_Store .cache # 日志文件 Logs/ # IDE设置 .idea/ ``` 以上规则将忽略Xcode的用户配置、CocoaPods的Pods目录和Lock文件、Swift编译产生的文件、缓存、日志以及IDE相关的设置。这有助于保持Git仓库的整洁,并...
".DS_Store"是Mac OS系统中用于保存文件夹视图设置的隐藏文件。".gitignore"文件用于指定在使用Git版本控制系统时应忽略的文件和目录,这表明该资源包可能与版本控制相关。"LICENSE"文件包含了该资源的授权协议,这...
1. `.DS_Store`:这是Mac OS系统特有的一个隐藏文件,记录了Finder中文件夹的布局和设置信息。 2. `README.md`:这是一个Markdown格式的文件,通常用来介绍项目的概述、使用方法和注意事项等信息。 3. `readme.txt`...
.DS_Store文件记录了文件夹的自定义属性,而.gitignore文件指定了Git版本控制系统中不希望被跟踪的文件或文件夹,确保项目的源代码管理更加高效。GLEnvs.podspec文件则是一个Podspec文件,它用于描述Objective-C项目...
- **MacOS**: Xcode自带Git,或者可以通过Homebrew安装:`$ brew install git`。 - **Windows**: 可以安装msysGit,也可以使用Git Bash,它提供了类似Linux的环境。 ##### 3.2 初次配置 为了确保每次提交都能够...
- `.DS_Store`: 这是Mac OS中的一个隐藏文件,存储了Finder窗口的自定义设置。 - `build/`目录:包含了编译过程产生的临时文件和构建产物,这些文件通常不需要提交。 - `*.pbxuser`: Xcode的用户配置文件,包含...
为了忽略特定文件,需要修改mydiff.bat脚本,添加macOS相关的过滤选项,例如`-x.DS_Store -x*.xcworkspacedata -xxcuserdata`等。 这些设置和工具的选择可以帮助Windows用户在不使用macOS的情况下更接近于iOS开发...
DS_Store文件是Mac OS用来存储文件夹的自定义属性;.gitignore文件用于忽略Git版本控制中不需要跟踪的文件;LICENSE文件用于声明软件的许可信息;PBXProj构建文件和XCWorkspaceData文件则是Xcode项目特有的文件,...