From 58a51476baa6d06782e9c951f2a0363eb6eca97c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 22 Jan 2020 18:48:12 +0300 Subject: .gitconfig: get rid of platform-specific core.editor Plus, many more comments. --- %HOME%/.gitconfig | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) (limited to '%HOME%') diff --git a/%HOME%/.gitconfig b/%HOME%/.gitconfig index c4f10b7..73e2bed 100644 --- a/%HOME%/.gitconfig +++ b/%HOME%/.gitconfig @@ -1,35 +1,48 @@ [user] name = Egor Tensin email = Egor.Tensin@gmail.com + [core] - editor = vim + # Don't touch line endings (I hate the fact that this is an option). + # My go-to approach now is to store everything w/ LF line endings in + # index (using '* text=auto' in root .gitattributes), and checkout with + # specific line endings as required (using additional records in + # .gitattributes, like '*.sh text eol=lf', '*.bat text eol=crlf', + # etc.). autocrlf = false +[push] + # If no refspec is given, push to the branch with the same name. + default = upstream + +# Show submodule changes in a more verbose way. [diff] - # Include submodule changes into git-diff's output. submodule = log +[status] + submoduleSummary = true + +# Automatically remove obsolete things/publish new things. [fetch] # Prune old branches: prune = true # Prune old tags (since Git 2.17.0): pruneTags = true -[include] - # Include a file with work-specific settings (like a different [user] - # section under a specific directory). - path = ~/.gitconfig_work +[push] + # Push new tags: + followTags = true + [log] + # Follow renames: follow = true + [mergetool] + # I don't even know why those are necessary, since we can abort and + # retry merges. keepBackup = false + [pull] - # Don't create a merge commit, fast-forward only. + # Don't create a merge commit when pulling, fast-forward only. ff = only -[push] - # If no refspec is given, push to the branch with the same name. - default = current - followTags = true -[status] - submoduleSummary = true [alias] clean-all = clean -fdx @@ -52,5 +65,10 @@ [filter "lfs"] smudge = git-lfs smudge -- %f process = git-lfs filter-process - required = true clean = git-lfs clean -- %f + required = true + +[include] + # Include a file with work-specific settings (like a different [user] + # section under a specific directory). + path = ~/.gitconfig_work -- cgit v1.2.3