From 3eb23cce9b586181913c211029022c2041139fda Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:38:48 +0200 Subject: [PATCH] git-config: update page (#13420) --- pages/common/git-config.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/git-config.md b/pages/common/git-config.md index 86bf7fe426..d383a83ac7 100644 --- a/pages/common/git-config.md +++ b/pages/common/git-config.md @@ -4,13 +4,13 @@ > These configurations can be local (for the current repository) or global (for the current user). > More information: . -- List only local configuration entries (stored in `.git/config` in the current repository): +- Globally set your name or email (this information is required to commit to a repository and will be included in all commits): -`git config --list --local` +`git config --global {{user.name|user.email}} "{{Your Name|email@example.com}}"` -- List only global configuration entries (stored in `~/.gitconfig` by default or in `$XDG_CONFIG_HOME/git/config` if such a file exists): +- List local or global configuration entries: -`git config --list --global` +`git config --list --{{local|global}}` - List only system configuration entries (stored in `/etc/gitconfig`), and show their file location: @@ -28,10 +28,10 @@ `git config --global --unset alias.unstage` -- Edit the Git configuration for the current repository in the default editor: +- Edit the local Git configuration (`.git/config`) in the default editor: `git config --edit` -- Edit the global Git configuration in the default editor: +- Edit the global Git configuration (`~/.gitconfig` by default or `$XDG_CONFIG_HOME/git/config` if such a file exists) in the default editor: `git config --global --edit`