Last active
January 21, 2026 19:38
-
-
Save r-medina/e3451dbfee1878b0aa376688369b3ca9 to your computer and use it in GitHub Desktop.
put in ~/.gitconfig
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
| [alias] | |
| # Remove files from index, keep working tree | |
| unstage = reset HEAD -- | |
| # Tracked-only, short status | |
| s = status -uno --short | |
| # Compact commit graph | |
| lg = log --all --decorate --oneline --graph | |
| # Delete merged local branches (safe set) | |
| cleanup = !git remote prune origin && git branch --merged | egrep -v '(^\\*|master|main|develop)' | xargs -r git branch -D | |
| [color] | |
| # Enable colored output | |
| ui = true | |
| [help] | |
| # Auto-fix mistyped commands after delay | |
| autocorrect = 5 | |
| [commit] | |
| # Show diff in commit message editor | |
| verbose = true | |
| [pull] | |
| # Rebase instead of merge on pull | |
| rebase = true | |
| [push] | |
| # Push current branch to its upstream | |
| default = simple | |
| # Auto-create upstream on first push | |
| autoSetupRemote = true | |
| # Push annotated tags with commits | |
| followTags = true | |
| [fetch] | |
| # Remove deleted remote branches locally | |
| prune = true | |
| [init] | |
| # Use 'main' for new repos | |
| defaultBranch = main | |
| [diff] | |
| # Better diff algorithm for code | |
| algorithm = histogram | |
| # Highlight moved lines | |
| colorMoved = plain | |
| # Use i/o prefixes in diffs | |
| mnemonicPrefix = true | |
| # Detect renames | |
| renames = true | |
| [rerere] | |
| # Reuse recorded conflict resolutions | |
| enabled = true | |
| # Auto-apply rerere resolutions | |
| autoupdate = true | |
| [rebase] | |
| # Autosquash fixup!/squash! commits | |
| autoSquash = true | |
| # Stash local changes before rebase | |
| autoStash = true | |
| # Update dependent branches | |
| updateRefs = true | |
| [merge] | |
| # Show base + both sides in conflicts | |
| conflictstyle = zdiff3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment