Last active
September 17, 2025 20:30
-
-
Save PurpleBooth/8110b6a8cc0f9aebafcfef1086bf8a54 to your computer and use it in GitHub Desktop.
Git Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git config --global core.pager delta | |
git config --global interactive.diffFilter "delta --color-only" | |
git config --global delta.navigate true | |
git config --global merge.conflictstyle zdiff3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Enable rerere | |
git config --global rerere.enabled true | |
# Set default branch to main | |
git config --global init.defaultBranch main | |
# Automatically stash changes when rebasing | |
git config --global rebase.autoStash true | |
# Autosquash marked commits with fixup | |
git config --global rebase.autoSquash true | |
# Rebase rather than making merge commits | |
git config --global pull.rebase true | |
# Include the commit message below the message template when committing | |
git config --global commit.verbose true | |
# More sensible diffs | |
git config --global diff.algorithm histogram | |
# No more stupid having to do "-u" on push | |
git config --global push.autoSetupRemote true | |
# Occasionally optimise the repository | |
git config --global maintenance.strategy incremental | |
# When you rebase a branch, also rebase the branches that were branched off by this branch, rather than just the branch (branch) | |
git config --global rebase.updateRefs true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment