我能够在XCode 4.5.1中为我的项目创建快照。但现在同样的项目只是不断告诉我:今天ealier将〜/ .gitconfig选项[push.default]更新为“simple”后无法在XCode 4.5.1中创建快照
Unable to create a snapshot
error: Malformed value for push.default: simple
error: Must be one of nothing, matching, tracking or current.
fatal: bad config file line 21 in /Users/oppih/.gitconfig
我记得,当我推开另一个项目在github上,系统提示我有这样的警告:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
所以我GOOGLE了它和不久之前发现这个问题:13148066,并得到它解决,我使用git config --global push.default simple
,因为“这是一个更直观的行为,这就是为什么默认情况正在改变这一点。”
我认为我的XCode问题必须与此git选项更新有关。
回到XCode,我没有选择在我的XCode项目中设置git repo,而是使用快照来备份我的代码。我认为在XCode的快照中有一些技巧,我无法弄清楚。现在我想知道是否有人能告诉我如何重新启用XCode中的快照(而不是更改.gitconfig [push.default]选项)?
我创建了这个脚本让Xcode在/ usr/local/bin中使用本地安装的Git。一探究竟。 https://gist.github.com/4659915 – Baub