2013-03-13 57 views
1

我遵循GIT的官方指南,實際上我在2.2.6段落「提交您的更改」 以前,在要求輸入命令如git commit和用戶身份

時,在第1.5.1節「身份」
git config --global user.name "John Doe" 

我錯過了--global選項,因爲我不需要它。 現在每次我做了git的承諾,我獲得

$git commit 

*** Please tell me who you are. 

Run 

    git config --global user.email "[email protected]" 
    git config --global user.name "Your Name" 

to set your account's default identity. 
Omit --global to set the identity only in this repository. 

,但我不想進入--global選項,確實存在另一種方式?

+0

你同時設置'user.email'和'user.name'?你能爲你的項目顯示'.git/config'的內容嗎? –

+0

您的問題的答案:'省略--global設置身份只有在這repository.' – forivall

+0

@CarlNorum [用戶] 名=卡特彼勒 電子郵件= [email protected] –

回答

6

如果你只是想將其設置爲倉庫,運行:

git config user.email "[email protected]" 
git config user.name "Your Name" 
+2

我做到了...... –