summaryrefslogtreecommitdiff
path: root/config/git
diff options
context:
space:
mode:
Diffstat (limited to 'config/git')
-rw-r--r--config/git/config49
-rw-r--r--config/git/config-local-example6
2 files changed, 55 insertions, 0 deletions
diff --git a/config/git/config b/config/git/config
new file mode 100644
index 0000000..9225b2a
--- /dev/null
+++ b/config/git/config
@@ -0,0 +1,49 @@
+[user]
+ name = Igor Soarez
+ email = igor@soarez.org
+; Settings another layer links in, then this host's own. git takes the last
+; value read, so config-local overrides config-fleet and [user] above, but not
+; the sections below it. git skips an include whose file is missing.
+[include]
+ path = ~/.config/git/config-fleet
+[include]
+ path = ~/.config/git/config-local
+[core]
+ excludesfile = ~/.config/git/ignore
+ editor = nvim
+ autocrlf = input
+[alias]
+ s = status -s
+ l = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%aN>%Creset' --graph --full-history
+ a = add -A
+ conflicts = diff --name-only --diff-filter=U
+ updateglobalignore = config --global core.excludesfile ~/.config/git/ignore
+ # Ignoring files that aren't .gitignore'd
+ ignored = ! git ls-files -v | grep -e ^[hsmrck]
+ ignore = update-index --assume-unchanged
+ unignore = update-index --no-assume-unchanged
+ changed = diff-tree --no-commit-id --name-only -r
+
+; This is required for cloning Go packages but fails for Rust's cargo
+; [url "git@github.com:"]
+; insteadOf = https://github.com/
+
+[help]
+ autocorrect = -1
+[color]
+ ui = true
+[push]
+ default = simple
+[pull]
+ ff = only
+[init]
+ defaultBranch = master
+
+[filter "lfs"]
+ smudge = git-lfs smudge -- %f
+ required = true
+ clean = git-lfs clean -- %f
+ process = git-lfs filter-process
+
+[safe]
+ directory = *
diff --git a/config/git/config-local-example b/config/git/config-local-example
new file mode 100644
index 0000000..9342b60
--- /dev/null
+++ b/config/git/config-local-example
@@ -0,0 +1,6 @@
+# Example ~/.config/git/config-local: git settings for this host only.
+# Not linked and never synced; config/git/config includes it when present.
+#
+# For instance, a different identity for everything under one directory:
+[includeIf "gitdir:~/src/other/"]
+ path = ~/.config/git/config-other