Last active
May 6, 2025 07:57
-
-
Save dcai/2885623 to your computer and use it in GitHub Desktop.
git config 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
root = true | |
[*] | |
indent_style = tab |
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
credentials |
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
*.php diff=php |
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
[include] | |
path = ~/.gitconfig.local | |
[init] | |
defaultBranch = main | |
[blame] | |
date = relative | |
[http] | |
lowSpeedLimit = 100 | |
lowSpeedTime = 3000 | |
postBuffer = 1000M | |
maxRequestBuffer = 1000M | |
[format] | |
pretty = format:%C(yellow)%h%C(reset) %C(yellow)%d%C(reset) %s %C(bold blue)<%an> %C(green)(%cr)%C(reset) | |
[core] | |
; pager = less | |
pager = diff-so-fancy | less --tabs=4 -RF | |
autocrlf = input | |
; autocrlf = false | |
eol = lf | |
excludesfile = ~/.config/git/ignore | |
filemode = false | |
logallrefupdates = true | |
precomposeunicode = true | |
commitGraph = true | |
compression = 0 | |
[commit] | |
gpgSign = false | |
[push] | |
default = current | |
followTags = true | |
recurseSubmodules = check | |
autoSetupRemote = true | |
[pull] | |
rebase = true | |
[instaweb] | |
local = true | |
httpd = webrick | |
port = 9999 | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
log = auto | |
status = auto | |
; ui = auto | |
ui = true | |
[color "diff-highlight"] | |
oldNormal = red bold | |
oldHighlight = red bold 52 | |
newNormal = green bold | |
newHighlight = green bold 22 | |
[color "diff"] | |
; meta = 11 | |
meta = yellow bold | |
frag = magenta bold | |
func = 146 bold | |
commit = yellow bold | |
old = red bold | |
new = green bold | |
whitespace = red reverse | |
[merge] | |
tool = vimdiff | |
conflictstyle = diff3 | |
[rerere] | |
enabled = true | |
autoupdate = 1 | |
[gc] | |
auto = 0 | |
rerereresolved = 60 days | |
reflogExpire = 120 days | |
[fetch] | |
prune = true | |
[diff] | |
compactionHeuristic = true | |
submodule = log | |
algorithm = patience | |
colorMoved = default | |
[rebase] | |
stat = true | |
autoStash = true | |
autoSquash = true | |
instructionFormat = <%aN> %s [%ar] | |
abbreviateCommands = true | |
missingCommitsCheck = warn | |
[credential] | |
helper = store --file ~/.git-credentials | |
[status] | |
showStat = true | |
showStash = true | |
submoduleSummary = true | |
relativePaths = true | |
[mergetool] | |
prompt = false | |
[pack] | |
windowMemory = 1G | |
packSizeLimit = 1G | |
threads = 1 | |
deltaCacheSize = 65535 | |
[add.interactive] | |
useBuiltin = false # required for git 2.37.0 | |
[diff] | |
colorMoved = default | |
compactionHeuristic = true | |
submodule = log | |
algorithm = patience | |
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
required = true | |
[safe] | |
directory = * | |
[interactive] | |
diffFilter = diff-so-fancy --patch | |
; diffFilter = delta --color-only | |
[delta] | |
features = decorations | |
side-by-side = true | |
navigate = true # use n and N to move between diff sections | |
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal) | |
dark = true | |
line-numbers = true | |
[delta "decorations"] | |
theme=zenburn | |
commit-decoration-style = blue ol | |
commit-style = raw | |
file-style = omit | |
hunk-header-decoration-style = blue box | |
hunk-header-file-style = red | |
hunk-header-line-number-style = "#067a00" | |
hunk-header-style = file line-number syntax | |
[alias] | |
b = branch | |
bc = branch --show-current | |
ci = commit | |
ci-pr = !sh -c 'git diff origin/HEAD | llmcommit.py --commit' | |
cis = !sh -c 'git diff --staged | llmcommit.py --commit --staged' | |
ciu = !sh -c 'git diff | llmcommit.py --commit' | |
auto-commit-and-push = !sh -c 'git diff | llmcommit.py --commit && git push -u' | |
co = checkout | |
cob = checkout -b | |
cobf = !git for-each-ref --format='%(refname:short)' refs/heads | fzf | xargs git checkout -b | |
cof = !git for-each-ref --format='%(refname:short)' refs/heads | fzf | xargs git checkout | |
cofr = !git for-each-ref --format='%(refname:lstrip=3)' refs/remotes | fzf | xargs git checkout | |
cot = !git tag | fzf | xargs -I REPLSTR git checkout -b REPLSTR REPLSTR | |
config-show-source-file=config --list --show-origin | |
conflicted = !vim +Conflicted | |
cpick = cherry-pick | |
d = diff --color-words --word-diff | |
dv = difftool -t vimdiff -y | |
difflast = !git last | xargs -o git show | |
editing-files = !git status --porcelain --no-renames | awk '{print $2}' | |
diff-selected = !git editing-files | fzf | xargs -o git diff | |
discard-selected = !git editing-files | fzf -m | xargs -o git checkout -- | |
; vim = ! sh -c 'vim $(git lastedited $1 | fzf)' - | |
; vim = ! sh -c 'vim $(git editing-files | fzf)' - | |
vim = !git editing-files | fzf | xargs -o nvim | |
rmb = "!git branch --format '%(refname:short)%(HEAD)' | grep -v -E '\\*|main|master|^Prod_Cdt_*|release\\/*|rc\\/*' | fzf --multi | xargs git branch --delete --force" | |
delete-merged = "!git branch --merged | grep -v '\\*' | egrep -v 'main|master|develop|rc' | xargs git branch -d" | |
f = fetch --all --prune --tags --force | |
fetch = fetch --all --prune --tags --force | |
fixup = commit --no-verify --fixup HEAD | |
git = !exec git | |
committed-files = !git pickhash | xargs -o git show --format="format:" --name-only | |
pickfile = !git committed-files | fzf --sync | sed -e "s#^#`git rev-parse --show-toplevel`/#" | xargs -o vim | |
; lastedited: list changed files in a commit, when no arg, list changesd files in HEAD | |
; last `sed` in pipe preppend git root dir to path | |
lastedited = ! sh -c 'git show --format="format:" --name-only $1 | grep -v "^$" | uniq | sed -e "s#^#`git rev-parse --show-toplevel`/#"' - | |
; vim: pick a file from change list and edit in vim | |
pickhash = !git log --abbrev-commit --color=always | fzf --sync --ansi | awk '{print $1}' | |
last = git show -s --format=%h | |
lasthash = !git log -n 1 --format=format:%H $1 | |
lastmsg = !git log -n 1 --format=format:%B | |
l = log --abbrev-commit --format=oneline --decorate=short | |
ll = log --abbrev-commit | |
lll = log --abbrev-commit --graph | |
pf = push -u --tags --force-with-lease | |
pr = ! sh -c 'git pull --all -r --tags && git submodule update' - | |
pull = pull --all -r --tags | |
push = push --tags | |
quick = ! sh -c 'git fixup && git rb && git push -uf' | |
rb = rebase --committer-date-is-author-date | |
rbs = !git -c sequence.editor=: rebase --autosquash -i origin/HEAD | |
rba = rebase --abort | |
rbc = rebase --continue | |
rbi = rebase -i origin/HEAD | |
; rbi = !git rebase -i $(git symbolic-ref --short refs/remotes/origin/HEAD) | |
rebase = rebase --committer-date-is-author-date | |
reset-to = ! sh -c 'git switch -C $(git branch --show-current) $1' - | |
ref = !git reflog | fzf | |
s = status | |
sm = submodule | |
smu = submodule update | |
s = status | |
stash = stash save --include-untracked | |
stu = status -uno -sb | |
undo = reset --soft HEAD^ | |
unstage = reset HEAD | |
web = instaweb | |
bl = branch --format='%(HEAD) %(color:red)%(refname:short)%(color:yellow) [%(committerdate:relative)]\n\t%(contents:subject) %(color:green) [%(authorname)]' --sort=-committerdate | |
bll = for-each-ref --sort='-committerdate' --format=\"%(color:green)%(refname:short)\t%(color:blue)%(authordate:relative)\t%(color:white)%(authorname)\t\" refs/remotes |
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
set mainfont {{Lucida Grande} 11} | |
set textfont {Monaco 9} | |
set uifont {Menlo 13 bold} | |
set tabstop 8 | |
set findmergefiles 0 | |
set maxgraphpct 50 | |
set maxwidth 16 | |
set cmitmode patch | |
set wrapcomment none | |
set autoselect 1 | |
set autosellen 40 | |
set showneartags 1 | |
set maxrefs 20 | |
set visiblerefs {"master"} | |
set hideremotes 0 | |
set showlocalchanges 1 | |
set datetimeformat {%Y-%m-%d %H:%M:%S} | |
set limitdiffs 1 | |
set uicolor grey85 | |
set want_ttk 1 | |
set bgcolor white | |
set fgcolor black | |
set uifgcolor black | |
set uifgdisabledcolor #999 | |
set colors {"#99FF00" red blue magenta darkgrey brown orange} | |
set diffcolors {red "#00a000" blue} | |
set mergecolors {red blue "#99FF00" purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} | |
set markbgcolor #e0e0ff | |
set diffcontext 3 | |
set selectbgcolor gray85 | |
set foundbgcolor yellow | |
set currentsearchhitbgcolor orange | |
set extdifftool opendiff | |
set perfile_attrs 0 | |
set headbgcolor #99FF00 | |
set headfgcolor black | |
set headoutlinecolor black | |
set remotebgcolor #ffddaa | |
set tagbgcolor yellow | |
set tagfgcolor black | |
set tagoutlinecolor black | |
set reflinecolor black | |
set filesepbgcolor #aaaaaa | |
set filesepfgcolor black | |
set linehoverbgcolor #ffff80 | |
set linehoverfgcolor black | |
set linehoveroutlinecolor black | |
set mainheadcirclecolor yellow | |
set workingfilescirclecolor red | |
set indexcirclecolor #99FF00 | |
set circlecolors {white blue gray blue blue} | |
set linkfgcolor blue | |
set circleoutlinecolor black | |
set geometry(main) 1600x893+93+111 | |
set geometry(state) normal | |
set geometry(topwidth) 1600 | |
set geometry(topheight) 165 | |
set geometry(pwsash0) "459 1" | |
set geometry(pwsash1) "690 1" | |
set geometry(botwidth) 572 | |
set geometry(botheight) 723 | |
set permviews {} |
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
.#* | |
.dropbox | |
.cvsignore | |
*.rej | |
*.orig | |
*.o | |
*.pem | |
*.class | |
*.pyc | |
log/* | |
tags* | |
# mac os stuff | |
.DS_Store | |
Icon | |
# Xcode | |
build/* | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 | |
!default.perspectivev3 | |
*.xcworkspace | |
!default.xcworkspace | |
xcuserdata | |
profile | |
*.moved-aside |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment