Julia Evans

Popular git config options

- Pull Handling: `pull.ff only` or `pull.rebase true` to avoid creating merge commits when upstream branch diverges. - Merge Conflict Readability: `merge.conflictstyle zdiff3` enhances merge conflict visibility by displaying the original code in the middle. - Automated Commit Modification: `rebase.autosquash true` combines `fixup!` commits with their targets during rebasing. - Automatic Stashing: `rebase.autostash true` runs `git stash` before and after rebasing. - Push Automation: `push.default current` or `push.default simple` pushes the current branch to a matching remote branch; `push.autoSetupRemote true` sets up tracking for the first push. - Default Branch: `init.defaultBranch main` creates a `main` branch instead of `master` in new repositories. - Commit Message Enhancement: `commit.verbose true` displays the commit diff in the commit message editor. - Conflict Resolution Automation: `rerere.enabled true` remembers and automates merge conflict resolutions. - Autocorrect: `help.autocorrect 10` allows Git to run autocorrections after a specified delay. - Diff Visualization: `core.pager delta` uses a syntax-highlighting diff viewer; `diff.algorithm histogram` improves function reordering visibility. - Global Gitignore: `core.excludesfile` specifies a global gitignore file. - Separate Git Configs: `includeIf` allows different configurations for personal and work repositories. - Data Corruption Prevention: `transfer.fsckobjects` and related settings detect and prevent data corruption. - Other Notable Options: Blame ignore, branch sorting, color settings, editor selection, commit cleanup, core settings, diff tools, merge settings, push follow tags, rebase safety, and log date format.
favicon
jvns.ca
jvns.ca