470

ファイルを使用して特定のファイルを除外するために、 gitでグローバル構成コマンドを実行しました.gitignore_global

git config --global core.excludesfile ~/.gitignore_global

この設定の作成をグローバルに元に戻す方法はありますか?

4

10 に答える 10

843

変更を「元に戻す」の意味がわかりません。core.excludesfile次のように設定を削除できます。

git config --global --unset core.excludesfile

そしてもちろん、設定ファイルを簡単に編集できます:

git config --global --edit

...そして、手で設定を削除します。

于 2012-08-08T16:08:34.650 に答える
75

--unset次のように、フラグを使用git configしてこれを行うことができます。

git config --global --unset user.name
git config --global --unset user.email

1 つの構成に複数の変数がある場合は、次を使用できます。

git config --global --unset-all user.name
于 2018-05-06T16:30:01.520 に答える
27

コマンドラインからこれを試して、git config の詳細を変更してください。

git config --global --replace-all user.name "Your New Name"

git config --global --replace-all user.email "Your new email"
于 2015-06-15T07:59:27.590 に答える
21

を使用してすべての構成設定を確認できます

git config --global --list

ユーザー名などの設定を削除できます

git config --global --unset user.name

次を使用して、手動で構成を編集したり、構成設定を手動で削除したりできます。

git config --global --edit 
于 2019-03-13T05:08:10.323 に答える
5

git config 情報は~/.gitconfigUNIX プラットフォームに保存されます。

Windows では、次の場所に保存されます。C:/users/<NAME>/.gitconfig.

このファイルを開き、関心のあるフィールドを削除することで、手動で編集できます。

于 2019-02-12T04:54:24.270 に答える