From 938700805bc1481c6b7db8fadb9d0bb836312fad Mon Sep 17 00:00:00 2001 From: bircni Date: Thu, 9 Jul 2026 23:50:21 +0000 Subject: [PATCH] docs: clarify that [git.config] options override Gitea's built-in defaults (#444) User-provided git config options are now applied after Gitea's built-in defaults, so they take precedence. Update the config cheat sheet to reflect this new behavior and add a warning about potentially breaking git operations. refers to https://github.com/go-gitea/gitea/pull/38172 --------- Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/docs/pulls/444 Reviewed-by: Lunny Xiao Co-authored-by: bircni --- docs/administration/config-cheat-sheet.md | 6 ++++-- .../version-1.27/administration/config-cheat-sheet.md | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index dd64a9cc..23b81cfd 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -1308,8 +1308,10 @@ Synchronize external user data (only LDAP user synchronization is supported) ### Git - Config options (`git.config`) -The key/value pairs in this section will be used as git config. -This section only does "set" config, a removed config key from this section won't be removed from git config automatically. The format is `some.configKey = value`. +The key/value pairs in this section will be used as git config. The format is `some.configKey = value`. +These options are written into the gitconfig file under `[git] HOME_PATH` when Gitea starts, and are applied **after** Gitea's built-in defaults — so values set here take precedence over the defaults listed below. + +**Note:** This section only does "set" config; a removed config key from this section won't be removed from git config automatically. Some config options might affect the behavior of git and cause Gitea's git operations to fail — make sure you know what you are doing before making changes. - `diff.algorithm`: **histogram** - `core.logAllRefUpdates`: **true** diff --git a/versioned_docs/version-1.27/administration/config-cheat-sheet.md b/versioned_docs/version-1.27/administration/config-cheat-sheet.md index 281d5b23..d0c9a0e4 100644 --- a/versioned_docs/version-1.27/administration/config-cheat-sheet.md +++ b/versioned_docs/version-1.27/administration/config-cheat-sheet.md @@ -1307,8 +1307,10 @@ Synchronize external user data (only LDAP user synchronization is supported) ### Git - Config options (`git.config`) -The key/value pairs in this section will be used as git config. -This section only does "set" config, a removed config key from this section won't be removed from git config automatically. The format is `some.configKey = value`. +The key/value pairs in this section will be used as git config. The format is `some.configKey = value`. +These options are written into the gitconfig file under `[git] HOME_PATH` when Gitea starts, and are applied **after** Gitea's built-in defaults — so values set here take precedence over the defaults listed below. + +**Note:** This section only does "set" config; a removed config key from this section won't be removed from git config automatically. Some config options might affect the behavior of git and cause Gitea's git operations to fail — make sure you know what you are doing before making changes. - `diff.algorithm`: **histogram** - `core.logAllRefUpdates`: **true**