【发布时间】:2012-10-22 01:09:03
【问题描述】:
我能够在 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
所以我搜索了一下,不久前发现了这个问题:13148066,并解决了,我使用git config --global push.default simple,因为“这是一种更直观的行为,这就是为什么默认值被更改为这个的原因。 "
我认为我的 XCode 问题一定与这个 git 选项更新有关。
回到 XCode,我没有选择在我的 XCode 项目中设置 git repo,而是使用快照作为备份我的代码的一种方式。我认为 XCode 的快照中的 git 有一些技巧,我无法弄清楚。现在我想知道是否有人可以告诉我如何在 XCode 中重新启用快照(而不是更改 .gitconfig [push.default] 选项)?
【问题讨论】:
-
我创建了这个脚本让 Xcode 使用你在 /usr/local/bin 中的本地安装的 Git。看看这个。 gist.github.com/4659915