2013-02-14 21 views

回答

25

這是我的〜/的.gitconfig:

[user] 
    name = Luigi R. Viggiano 
    email = [email protected] 
[color] 
    ui = true 
[merge] 
    tool = p4merge 
[diff] 
    tool = p4merge 
[push] 
    default = simple 

~/.gitconfig是不是在正確的格式。

你並不需要把命令:

git config --global user.name "trx" 
git config --global user.email [email protected] 
在文件

...你需要在終端上鍵入它們。

刪除您的~/.gitconfig並使用終端上的git config命令對其進行操作,如教程中所述。

+0

Doh,這很有趣。我認爲這些是從文件中讀取時會運行的命令。非常感謝。 (5分鐘接受) – Chazt3n 2013-02-14 14:20:20

+0

不客氣。 – 2013-02-14 17:09:05

4

這些git config行是您應該運行的命令,而不是配置文件的內容。