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 <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/444
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni
2026-07-09 23:50:21 +00:00
committed by Lunny Xiao
parent 690cf6b9a0
commit 938700805b
2 changed files with 8 additions and 4 deletions

View File

@@ -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**