Конфиг git
Скопируйте сниппет настроек в
~/.gitconfigв Unix или папку пользователя в WindowsУкажите свое имя (на русском) и корпоративный email
(желательно) Настройте подпись коммитов
Установите GPG
Создайте ключ для подписи коммитов
Укажите ключ в
signingkeyУстановите
gpgSignвtrue
[user]
name =
email =
signingkey =
[color]
ui = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[alias]
pfl = push --force-with-lease
rom = rebase origin/master
prune = fetch --prune
# https://git-scm.com/docs/git-reset#git-reset-emgitresetemltmodegtltcommitgt
undo = reset --soft HEAD^
# https://git-scm.com/docs/git-stash
stash-all = stash save --include-untracked
# https://git-scm.com/docs/git-log
glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
[merge]
# NOTE: глобальная опция – применяется ко всем слияниям, включая через merge-реквесты
# https://git-scm.com/docs/git-config#git-config-mergeff
ff = only
# https://git-scm.com/docs/git-config#git-config-mergeconflictStyle
conflictstyle = diff3
[commit]
# подпись коммитов посредством ключей через GPG
# https://help.github.com/articles/about-gpg/
# https://git-scm.com/docs/git-config#git-config-commitgpgSign
gpgSign = false
[tag]
# подпись коммитов посредством ключей через GPG
gpgSign = false
[push]
# пуш изменений в удаленную ветку с тем же именем
# https://git-scm.com/docs/git-config#git-config-pushdefault
default = simple
# https://git-scm.com/docs/git-config#git-config-pushfollowTags
followTags = true
[status]
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles
showUntrackedFiles = all
[transfer]
# NOTE: применяется в рамках receive и transmit операций
# https://git-scm.com/docs/git-config#git-config-transferfsckObjects
# via https://groups.google.com/forum/#!topic/binary-transparency/f-BI4o8HZW0
fsckobjects = true
[diff]
# via http://owen.cymru/github-style-diff-in-terminal-with-icdiff/
tool = icdiff
[difftool]
prompt = false
trustExitCode = true
[difftool "icdiff"]
cmd = /usr/local/bin/icdiff --line-numbers $LOCAL $REMOTE
[mergetool]
prompt = falseПоследнее обновление