Files
brave-core/docs/git_configuration.md
T
cdesouza-chromium 78129286ae [docs] Include docs/ to md auto-format (#36521)
This is in conformance with the guidelines that `.md` files under
`docs/` must use 80-columns.
2026-05-19 20:02:22 +01:00

1.2 KiB

Git Configuration

It is recommended to use this configuration in .gitconfig to ensure consistent whitespace rules, improve code readability, prevent unnecessary diffs, and maintain proper file formatting with a final newline.

[core]
    whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
  • fix: Automatically fixes whitespace issues in patches (e.g., removes/trims trailing spaces, adds a carriage return at the end of a file if it's missing, etc.).
  • -indent-with-non-tab: Prevents warnings about lines that are indented with spaces instead of tabs (essentially ignores this issue).
  • trailing-space: Flags or fixes trailing spaces at the end of lines.
  • cr-at-eol: Ensures that files end with a carriage return (newline) at the end of the last line.

You can apply this configuration directly from the command line by running:


git config --global --add core.whitespace fix,-indent-with-non-tab,trailing-space,cr-at-eol

For further details and additional tips for improving Git performance, you can refer to Chromium's Guide on Improving Performance of Git Commands.