12

私はGITの公式ガイドに従っていますが、実際には2.2.6段落「変更のコミット」にいます。以前は、セクション1.5.1「ID」で次のようなコマンドの入力を求められました。

git config --global user.name "John Doe"

--globalオプションは必要ないので、見逃しました。これで、git commitを実行するたびに、次のようになります。

$git commit

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  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オプションを入力したくないのですが、別の方法がありますか?

4

2 に答える 2

17

そのリポジトリに設定するだけの場合は、次を実行します。

git config user.email "you@example.com"
git config user.name "Your Name"
于 2013-03-13T17:44:26.697 に答える