From b5ec8d9bd74db9fbca0695e57d79e46722b6e07b Mon Sep 17 00:00:00 2001 From: Lnk User Date: Thu, 26 Jun 2025 18:27:19 +0200 Subject: [PATCH] lnk: added .gitconfig --- .gitconfig | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++ .lnk | 1 + 2 files changed, 118 insertions(+) create mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..28271d9 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,117 @@ +[user] + name = Maxence G. de Montauzan + email = maxence@gdemontauzan.fr + +[color] + diff = auto + status = auto + branch = auto + +[alias] + alias = config --get-regexp alias + + st = status + ci = commit + co = checkout + cp = cherry-pick + br = branch + lg = log --oneline --graph --decorate # oneline = "--pretty=oneline --abbrev-commit" + lga = log --oneline --graph --decorate --all + unstage = reset HEAD + reinit = reset --hard HEAD + pr = pull --rebase + diffc = diff --cached + amend = commit --amend + undo = reset --soft HEAD^ + undoh = reset --hard HEAD^ + who = shortlog -nse + + sts = status -sb + dc = diff --cached + ls = log --pretty=format:'%C(yellow)%h %C(cyan)%ar%C(red)%d %C(reset)%s %C(green)[%cN] %C(blue)(%ad)%C(reset)' --decorate --date=short --graph # pretty one-line log with tags, branches and authors + lsa = log --pretty=format:'%C(yellow)%h %C(cyan)%ar%C(red)%d %C(reset)%s %C(green)[%cN] %C(blue)(%ad)%C(reset)' --decorate --date=short --all --graph # pretty one-line log with tags, branches and authors + lsv = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cN]%C(reset)' --decorate --date=short --numstat # a verbose ls, shows changed files too + + force = push --force-with-lease + fetcha = fetch --all + rprune = remote prune + fix = commit --no-edit --amend + # https://blog.oddbit.com/post/2016-02-19-a-collection-of-git-tips/ + + last = log -1 --oneline --pretty=format:'%C(yellow)%h%C(auto)%d %C(reset)%s -- %C(cyan)%ar %Cgreen%aN%C(reset)' + last-changed = show --name-only --oneline + com = commit -m + branchv = branch -vv + + # Not really used + graphlog = log --graph --abbrev-commit --decorate --date=relative --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)' --all + # fup = log --since '1 day ago' --oneline --author # I know what you did yesterday - great for follow-ups + list-file = log --pretty=format: --name-only --diff-filter=A + stat = diff --stat # Show diff stats with a branch + + # difft + dlog = -c diff.external='difft' log --ext-diff + dshow = -c diff.external='difft' show --ext-diff + ddiff = -c diff.external='difft' diff + +[core] + editor = vim + excludesfile = ~/.gitignore-global + pager = less -eRXF + autocrlf = input + +[help] + autocorrect = 1 + +[push] + default = current + +[rebase] + autoSquash = true + +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + +[init] + defaultBranch = main + +[pager] + diff = delta + log = delta + reflog = delta + show = delta + blame = delta + +[interactive] + diffFilter = delta --color-only --features=interactive + +[delta] + features = decorations + line-numbers = true + plus-style = syntax "#003500" + plus-non-emph-style = syntax "#003500" + plus-emph-style = syntax bold "#00737D" + +[delta "interactive"] + keep-plus-minus-markers = false + +[delta "decorations"] + 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 + +[ghq] + root = ~/workspace/ghq + +[stgit "alias"] + r = refresh + s = series + sr = series -r + stack = series -rOP diff --git a/.lnk b/.lnk index a3e21fe..f9a8f87 100644 --- a/.lnk +++ b/.lnk @@ -4,3 +4,4 @@ .config/atuin/config.toml .emacs .fzf_custom +.gitconfig