From 427fb208f6330b9dd3e2b5f209771666a9953a46 Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Sun, 4 Feb 2024 11:55:34 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20.gitconfig=20tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git/.gitconfig.symlink | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/git/.gitconfig.symlink b/git/.gitconfig.symlink index 352a3d0..5b1fc8b 100644 --- a/git/.gitconfig.symlink +++ b/git/.gitconfig.symlink @@ -5,6 +5,25 @@ excludesFile = ~/dotfiles/git/.gitignore hooksPath = ~/dotfiles/git/hooks + # Whitespace types to treat as errors. + # blank-at-eol: looks for spaces at EOL. + # -blank-at-eof: allows blank lines at EOF. + # space-before-tab: looks for spaces immediately before tabs at the beginning + # of the line. + whitespace = blank-at-eol,-blank-at-eof,space-before-tab + + # Make `git rebase` safer on macOS. + # More info: + trustctime = false + + # Prevent showing files whose names contain non-ASCII symbols as unversioned. + # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html + precomposeunicode = false + + # Speed up commands involving untracked files such as `git status`. + # https://git-scm.com/docs/git-update-index#_untracked_cache + untrackedCache = true + [user] # Do not guess the user's identity. useConfigOnly = true @@ -24,17 +43,41 @@ [init] defaultBranch = main + [commit] template = ~/dotfiles/git/commit_template + [push] autoSetupRemote = true + + # Push tags automatically. + followTags = true + [rebase] autosquash = true + [merge] + # Include summaries of merged commits in merge commit messages. + log = true + tool = vimdiff + [mergetool] keepBackup = false hideResolved = true +[diff] + # Detect when files are copied as well as renamed. + renames = copies + +[apply] + # Fix whitespace errors when applying a patch, as specified in + # core.whitespace. + whitespace = true + +[branch] + # Show most recently changed branches first. + sort = -committerdate + [include] path = ~/.gitconfig.local