我正在全新安裝
Linux Mint.
嘗試從任何存儲庫推送時,我收到以下錯誤:
error: Malformed value for push.default: simple
error: Must be one of nothing,matching,tracking or current.
fatal: bad config file line 8 in /home/leng/.gitconfig
fatal: Could not read from remote repository.
這很奇怪,因為我肯定有一個支持簡單推送行為的版本.
git –version的輸出是git版本1.8.3.2.
?/ .gitconfig的內容:
[user]
name = My Name
email = MyEmail@website.com
[color]
ui = true
[push]
default = simple
這是令人毛骨悚然的地方.
如果我將行為更改為匹配(或任何,跟蹤或當前,為此),然后嘗試推送,我得到相同的確切錯誤消息.怎么可能?是以某種方式緩存配置?我甚至試過重啟.我甚至嘗試從系統中徹底清除GIT(并刪除?/ .gitconfig)然后重新安裝它.
如果我從.gitconfig文件中完全刪除[push]部分(或者如果我完全刪除文件),那么嘗試推送,然后我得到:
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
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)
error: Malformed value for push.default: simple
error: Must be one of nothing,tracking or current.
fatal: bad config file line 8 in /home/leng/.gitconfig
fatal: Could not read from remote repository.
…所以它似乎都承認我沒有選擇推動行為,但后來也說我選擇了一種不受支持的行為.到底是怎么回事?
如果我完全刪除?/ .gitconfig,我甚至會收到錯誤.
有誰可以幫我解決這個巫術?
謝謝!
編輯:
這是一個請求的.git / config文件:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://{my remote repo}
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master