我已经使用git一段时间了,它在我的存储库上工作正常。但是,我最近升级到XCode 7,现在当我尝试git push <branch>
时,我收到以下错误消息:
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
fatal: 'Develop_New_Car' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我有git version 2.3.3
并且正在运行which git
给了我/usr/local/bin/git
答案 0 :(得分:0)
git config --global push.default simple
应该足够了,但XCode7可能不像以前那样在同一个地方($ HOME)中寻找全局设置。
在这种情况下,至少尝试在由XCode7管理的仓库中本地设置该配置:
cd /path/to/my/git/repo
git config push.default simple