Last active
November 19, 2025 04:37
-
-
Save bsara/4a7069cc3319d1ec63d7cc4242921cc2 to your computer and use it in GitHub Desktop.
Standard .gitconfig sections
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
| [branch] | |
| autosetuprebase = always | |
| [core] | |
| autocrlf = false | |
| ignorecase = false | |
| [push] | |
| default = simple | |
| [pull] | |
| default = simple |
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] | |
| a = forgit add | |
| aa = add -A | |
| ai = add --interactive | |
| b = branch | |
| bd = forgit branch_delete | |
| bl = forgit blame | |
| br = branch -r | |
| f = fetch | |
| ps = push | |
| pdr = pull -r origin develop | |
| pl = pull | |
| plr = pull -r | |
| pmr = pull -r origin master | |
| pmmr = pull -r origin main | |
| c = commit | |
| cam = commit --amend | |
| cl = forgit clean | |
| co = checkout | |
| cob = forgit checkout_branch | |
| coc = forgit checkout_commit | |
| cof = forgit checkout_file | |
| cot = forgit checkout_tag | |
| cp = cherry-pick | |
| cpa = cherry-pick --abort | |
| cpc = cherry-pick --continue | |
| cpf = forgit cherry_pick | |
| i = forgit ignore | |
| m = merge | |
| rb = rebase | |
| rba = rebase --abort | |
| rbc = rebase --continue | |
| rh = forgit reset_head | |
| s = status | |
| sh = forgit show | |
| sm = submodule | |
| smu = submodule update --init | |
| smur = submodule update --init --recursive | |
| ss = forgit stash_show | |
| t = tag | |
| rv = !git stash && git stash drop | |
| pr = remote update --prune | |
| rmb = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' - | |
| rmt = !sh -c 'git push origin :refs/tags/$1 && git tag -d $1' - | |
| mg = mergetool | |
| d = forgit diff | |
| dt = difftool | |
| df = diff --name-status | |
| dw = diff -w | |
| l = log --abbrev-commit --first-parent --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| ll = log --abbrev-commit --graph --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| lo = forgit log | |
| ld = log --abbrev-commit --first-parent --pretty=format:'%C(bold blue)%ai%C(reset) - %C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| lda = log --abbrev-commit --graph --pretty=format:'%C(bold blue)%ai%C(reset) - %C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| la = log --abbrev-commit --name-status --first-parent --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| lla = log --abbrev-commit --name-status --pretty=format:'%C(dim white)%h%C(reset)%C(bold green)%d%C(reset) %s %C(yellow)<%an>%C(reset)' | |
| lg = !git lg1 | |
| lg1 = !git lg1-specific --all | |
| lg2 = !git lg2-specific --all | |
| lg3 = !git lg3-specific --all | |
| lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' | |
| lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
| lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' |
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
| [diff] | |
| tool = meld | |
| [diff "exif"] | |
| binary = true | |
| cachetextconv = true | |
| textconv = exiftool | |
| [diff "docx"] | |
| binary = true | |
| textconv = docx2txt | |
| [diff "odt"] | |
| binary = true | |
| textconv = odt2txt | |
| [difftool "intellij"] | |
| cmd = idea diff "$LOCAL" "$REMOTE" |
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
| [merge] | |
| tool = meld | |
| conflictstyle = diff3 | |
| [mergetool "meld"] | |
| cmd = meld "$LOCAL" "$MERGED" "$REMOTE" | |
| [mergetool "intellij"] | |
| cmd = idea merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment