Last active
September 26, 2025 08:08
-
-
Save KmolYuan/51087cc60207f8a358674fbf495aa8f3 to your computer and use it in GitHub Desktop.
My git configuration
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
| [core] | |
| editor = code --wait | |
| [pull] | |
| rebase = true | |
| [format] | |
| pretty = %C(auto)%h %d %s | |
| [log] | |
| decorate = short | |
| [fetch] | |
| prune = true | |
| pruneTags = true | |
| [alias] | |
| abort = "!f() { git status | grep -o 'git .* --abort' | bash -s; }; f" | |
| amend = "!f() { if git diff --cached --quiet; then git add -A; fi; git commit --amend --no-edit; }; f" | |
| between = "!f() { git --no-pager diff --shortstat $1...HEAD; }; f" | |
| continue = rebase --continue | |
| fix = "!f() { if git diff --cached --quiet; then git add -A; fi; git commit --fixup=$1; }; f" | |
| jump = reset --hard | |
| select = "!f() { git rebase -i $1; }; f" | |
| squash = "!f() { git rebase -i $1 --autosquash; }; f" | |
| to = checkout | |
| tracking = for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads | |
| [pager] | |
| branch = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment