From 97f2cf839be502fd43deb9aeecb93dad5b9bea37 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Mon, 20 Jan 2025 04:15:35 +0200 Subject: [PATCH 1/2] Update git-config.md --- pages/common/git-config.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/common/git-config.md b/pages/common/git-config.md index d383a83ac792a9..a04dc2078cd94f 100644 --- a/pages/common/git-config.md +++ b/pages/common/git-config.md @@ -8,25 +8,25 @@ `git config --global {{user.name|user.email}} "{{Your Name|email@example.com}}"` -- List local or global configuration entries: +- List local, global or system configuration entries and show their file location: -`git config --list --{{local|global}}` +`git config --list --{{local|global|system}} --show-origin` -- List only system configuration entries (stored in `/etc/gitconfig`), and show their file location: +- Set the global value of a given configuration entry (in this case an alias): -`git config --list --system --show-origin` +`git config --global {{alias.unstage}} "reset HEAD --"` - Get the value of a given configuration entry: -`git config alias.unstage` +`git config {{alias.unstage}}` -- Set the global value of a given configuration entry: +- Use an alias: -`git config --global alias.unstage "reset HEAD --"` +`git unstage` - Revert a global configuration entry to its default value: -`git config --global --unset alias.unstage` +`git config --global --unset {{alias.unstage}}` - Edit the local Git configuration (`.git/config`) in the default editor: From 4f52a4434741a47e9b9efcc745aef87b41075b06 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:22:09 +0200 Subject: [PATCH 2/2] Update git-config.md --- pages/common/git-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-config.md b/pages/common/git-config.md index a04dc2078cd94f..4f598feec9cb3b 100644 --- a/pages/common/git-config.md +++ b/pages/common/git-config.md @@ -22,7 +22,7 @@ - Use an alias: -`git unstage` +`git {{unstage}}` - Revert a global configuration entry to its default value: