Ваша глобальная конфигурация git (~ / .gitconfig) должна действительно содержать настройки, которые применяются ко ВСЕМ вашим репозиториям. Прежде всего, такие вещи, как user.name
, user.email
, core.editor
, merge
и diff
должны быть установлены достаточно последовательно. При этом я также хотел бы включить color
, core.pager
, rerere
, rebase.autosquash
и множество псевдонимов.
[color]
filemode = false
diff = auto
status = auto
branch = auto
pager = true
[alias]
b = branch
ci = commit
co = checkout
cob = checkout -b
d = diff
l = log
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --branches
st = status
fixup = !sh -c 'git commit -a -m \"fixup! $(git log -1 --format='%s' $@)\"' -
squash = !sh -c 'git commit -a -m \"squash! $(git log -1 --format='%s' $@)\"' -
ri = rebase --interactive
rc = rebase --continue
pr = push gerrit HEAD:refs/for/master
mt = mergetool
[user]
email = REDACTED
name = Matt Henkel
[core]
pager = less -FRSX
excludes = ~/.gitexcludes
editor = vim
[rerere]
enabled = true
autoupdate = true
[rebase]
autosquash = true
[merge]
tool = kdiff3
[mergetool "kdiff3"]
keepBackup = false
trustExitCode = false
[diff]
tool = kdiff3