Files
dotfiles/git/.gitconfig
Dmitry 89c55ac4ef Add tmux and vim configuration files
- Introduced a comprehensive tmux configuration file with custom themes, key bindings, and session management options.
- Added a lightweight vim configuration file utilizing vim-plug for plugin management, including themes, fuzzy finder, file tree, and editing helpers.
2025-12-11 12:03:40 +03:00

231 lines
7.1 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ════════════════════════════════════════════════════════════
# Git Configuration
# ════════════════════════════════════════════════════════════
[user]
# Укажите ваше имя и email
name = Dmitry
email = 124861781+ada-dmitry@users.noreply.github.com
[core]
# Редактор по умолчанию
editor = micro
# Игнорировать изменения прав доступа
filemode = false
# Автоматическое преобразование CRLF в LF
autocrlf = input
# Предупреждать о пробелах в конце строк
whitespace = trailing-space,space-before-tab
# Использовать pager для вывода (bat если установлен)
# -F: выходить если вывод помещается на один экран
# -R: показывать цвета
# -X: не очищать экран при выходе
# -S: не переносить длинные строки
pager = less -FRXS
excludesfile = /home/ada/.gitignore_global
[init]
# Имя основной ветки по умолчанию
defaultBranch = main
[color]
# Включить цветной вывод
ui = auto
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow bold
local = green
remote = cyan
[color "diff"]
meta = yellow
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
# ═══ Алиасы ═════════════════════════════════════════════════
[alias]
# Базовые сокращения
st = status
co = checkout
br = branch
ci = commit
cm = commit -m
ca = commit --amend
# Добавление файлов
a = add
aa = add --all
ap = add --patch
# Логи
l = log --oneline --graph --decorate
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ll = log --pretty=format:'%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]' --decorate --numstat
ls = log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Creset%d %s' --date=short
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
# История файла
filelog = log -u
fl = log -u
# Diff
d = diff
ds = diff --staged
dc = diff --cached
# Показать последний коммит
last = log -1 HEAD --stat
# Отменить последний коммит (сохранив изменения)
undo = reset --soft HEAD^
# Показать изменения в файле
blame = blame -w -M -C
# Быстрое переключение веток
switch = checkout
sw = checkout
# Создать и переключиться на новую ветку
cob = checkout -b
# Удалить ветку
brd = branch -d
brD = branch -D
# Обновить текущую ветку
up = pull --rebase --autostash
# Отправить текущую ветку
push-current = push -u origin HEAD
pc = push -u origin HEAD
# Stash
sl = stash list
sa = stash apply
ss = stash save
sp = stash pop
# Показать файлы в коммите
show-files = show --pretty="" --name-only
# Статистика коммитов
contributors = shortlog -sn
# Удалить удаленные ветки из локального репозитория
prune-all = fetch --all --prune
# Показать ветки с последними коммитами
branches = branch -vv
# Показать удаленные репозитории
remotes = remote -v
# Найти коммит по сообщению
find = log --all --oneline --grep
# Игнорировать изменения в файле
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
# Создать архив текущей ветки
archive-branch = !git archive --format=tar --prefix=$(git symbolic-ref --short HEAD)/ HEAD | gzip > $(git symbolic-ref --short HEAD).tar.gz
# Показать размер репозитория
repo-size = count-objects -vH
[push]
# Отправлять только текущую ветку
default = current
# Автоматически создавать удаленную ветку
autoSetupRemote = true
[pull]
# Использовать rebase вместо merge при pull
rebase = true
[fetch]
# Автоматически удалять несуществующие удаленные ветки
prune = true
[rebase]
# Автоматически применять stash перед rebase
autoStash = true
[merge]
# Показывать конфликты в стиле diff3
conflictStyle = diff3
# Инструмент для разрешения конфликтов
tool = vimdiff
[diff]
# Алгоритм diff для лучшего качества
algorithm = histogram
# Показывать перемещения файлов
renames = copies
# Инструмент для просмотра diff
tool = vimdiff
[status]
# Показывать подмодули в статусе
submoduleSummary = true
# Показывать непроиндексированные файлы
showUntrackedFiles = all
[log]
# Показывать даты в относительном формате
date = relative
[help]
# Автоматически исправлять опечатки в командах (после 0.1 сек)
autocorrect = 10
[credential]
# Кэшировать пароли на 1 час
helper = cache --timeout=3600
# ═══ URL shortcuts ══════════════════════════════════════════
[url "git@github.com:"]
insteadOf = gh:
[url "https://github.com/"]
insteadOf = github:
[url "https://gitlab.com/"]
insteadOf = gitlab:
# ═══ Дополнительные настройки ═══════════════════════════════
[filter "lfs"]
# Git LFS (Large File Storage)
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
# ═══ Ваши дополнительные настройки ═════════════════════════
# Добавьте свои настройки ниже