ファイルを使用して特定のファイルを除外するために、 gitでグローバル構成コマンドを実行しました.gitignore_global
。
git config --global core.excludesfile ~/.gitignore_global
この設定の作成をグローバルに元に戻す方法はありますか?
ファイルを使用して特定のファイルを除外するために、 gitでグローバル構成コマンドを実行しました.gitignore_global
。
git config --global core.excludesfile ~/.gitignore_global
この設定の作成をグローバルに元に戻す方法はありますか?
変更を「元に戻す」の意味がわかりません。core.excludesfile
次のように設定を削除できます。
git config --global --unset core.excludesfile
そしてもちろん、設定ファイルを簡単に編集できます:
git config --global --edit
...そして、手で設定を削除します。
--unset
次のように、フラグを使用git config
してこれを行うことができます。
git config --global --unset user.name
git config --global --unset user.email
1 つの構成に複数の変数がある場合は、次を使用できます。
git config --global --unset-all user.name
コマンドラインからこれを試して、git config の詳細を変更してください。
git config --global --replace-all user.name "Your New Name"
git config --global --replace-all user.email "Your new email"
を使用してすべての構成設定を確認できます
git config --global --list
ユーザー名などの設定を削除できます
git config --global --unset user.name
次を使用して、手動で構成を編集したり、構成設定を手動で削除したりできます。
git config --global --edit
git config 情報は~/.gitconfig
UNIX プラットフォームに保存されます。
Windows では、次の場所に保存されます。C:/users/<NAME>/.gitconfig.
このファイルを開き、関心のあるフィールドを削除することで、手動で編集できます。