]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vcs/gitconfig.in
shell: set GOTOOLCHAIN=local
[config/dotfiles.git] / vcs / gitconfig.in
index 1394a4bb2c3614c20838c9f6f5df296cc39b4ce6..b438ffd7e91714f174fd77dabad4699f605b20b4 100644 (file)
@@ -1,6 +1,6 @@
 # Global Git configuration file.
 
-# Copyright (C) 2011-2018  Simon Ruderich
+# Copyright (C) 2011-2023  Simon Ruderich
 #
 # This file is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
        name = Simon Ruderich
        email = simon@ruderich.org
 
-[color]
-       ui = auto
-
-[color "diff"]
-       # Meta information.
-       meta = yellow bold
-       # Hunk header.
-       frag = magenta bold
-       # Function in hunk header.
-       func = blue bold
-       # Removed lines.
-       old = red bold
-       # Added lines.
-       new = green bold
-       # Commit headers.
-       commit = cyan
-
-[color "grep"]
-       # GNU grep-like colors.
-       filename = magenta
-       linenumber = green
-
-[core]
-       editor = vim
-
-[pager]
-       # Use pager for the following commands.
-       status = true
-       tag = true
-
-[interactive]
-       # Don't require <Return> in interactive commands which require only a
-       # single key, for example `git add --patch`. Requires Perl module
-       # Term::Readkey.
-       singlekey = true
+[advice]
+       # Disable annoying advice messages.
+       waitingForEditor = false
 
 [alias]
        ## Shortcuts for often used commands.
@@ -62,7 +30,7 @@
        ## Local.
        c   = commit --verbose
        ca  = commit --verbose --amend
-       cad = commit --verbose --amend --date=
+       cad = commit --verbose --amend --date=now
        d   = diff
        dw  = diff --color-words
        ds  = diff --stat
@@ -76,7 +44,7 @@
        ls  = log --stat
        lp  = log --patch
        lpw = log --patch --color-words
-       ld  = show --date=short -s --pretty='format:%h (\"%s\", %ad)' # describe
+       ld  = show --no-patch --date=short --pretty='format:%h (%s, %ad)' # describe, same as --pretty=reference
        a   = add
        ap  = add --patch
        au  = add --update
        f   = fetch
        t   = tag
        p   = push
+       pf  = push --force-with-lease
        # Parallel git remote update. Also strips unnecessary output.
        ru = "! git remote \
              | xargs -d '\\n' -n1 -P0 git remote update 2>&1 \
                   done' argv0 \
             | less"
 
+[color]
+       ui = auto
+
+[color "diff"]
+       # Meta information.
+       meta = yellow bold
+       # Hunk header.
+       frag = magenta bold
+       # Function in hunk header.
+       func = blue bold
+       # Removed lines.
+       old = red bold
+       # Added lines.
+       new = green bold
+       # Commit headers.
+       commit = cyan
+
+[color "grep"]
+       # GNU grep-like colors.
+       filename = magenta
+       linenumber = green
+
+[core]
+       editor = vim
+
 [diff]
        # Detect copies and renames.
        renames = copy
        # Highlight moved code in a different color.
        colorMoved = zebra
 
+       # Highlight whitespace errors (at the end of the line) in all lines of
+       # a diff; the default shows them only in new lines
+       wsErrorHighlight = old,new,context
+
        # Replace "a/" and "b/" prefix in diffs with characters describing the
        # context (e.g. "i/"ndex and "w/"ork tree).
        mnemonicprefix = true
        wordRegex = [a-zA-Z0-9_]+|[^a-zA-Z0-9_]
 
 # Rules to allow diffing of some binary files. Disabled by default to prevent
-# programs from running them on arbitrary files via a .local .gitattributes
+# repositories from running them on arbitrary files via a local .gitattributes
 # file. Copy them to .git/config of the repository to enable them.
 #
 # "sh -c '..' ARGV0" is used when the programs require additional arguments
 #[diff "sqlite"]
 #      textconv = sh -c 'exec sqlite3 "$@" .dump' ARGV0
 
+[format]
+       # When using git format-patch use threads and add all patches as
+       # replies to the first one.
+       thread = shallow
+
+[init]
+       # Don't create .git/hooks with any sample hooks. Reduces the clutter
+       # in new git repositories.
+       templateDir =
+       # Keep the default branch name
+       defaultBranch = master
+
+[interactive]
+       # Don't require <Return> in interactive commands which require only a
+       # single key, for example `git add --patch`. Requires Perl module
+       # Term::Readkey.
+       singlekey = true
+
 [log]
        # Display branches/tag names in log (same as log's --decorate option).
        decorate = short
        # Merge upstream branch if `git merge` is called without arguments.
        defaultToUpstream = true
 
-[rebase]
-       # Use single-letter command names in git rebase -i which are faster to
-       # change.
-       abbreviateCommands = true
+[pager]
+       # Use pager for the following commands.
+       status = true
+       tag = true
 
 [push]
        # When running git push without a refspec push only the current
        # 2.0.
        default = simple
 
-[format]
-       # When using git format-patch use threads and add all patches as
-       # replies to the first one.
-       thread = shallow
+[rebase]
+       # Use single-letter command names in git rebase -i which are faster to
+       # change.
+       abbreviateCommands = true
+
+[safe]
+       # Ignore embedded bare repositories to prevent executing arbitrary
+       # commands from untrusted repositories
+       bareRepository = explicit
+
+[tag]
+       # Sort tags as version numbers
+       sort = version:refname
 
 [transfer]
        # Automatically fsck objects when receiving them (respected by git
        # receive-pack and git fetch (>= 1.7.8, for fetch)).
        fsckObjects = true
 
-[advice]
-       # Disable annoying advice messages.
-       waitingForEditor = false
-
-[init]
-       # Don't create .git/hooks with any sample hooks. Reduces the clutter
-       # in new git repositories.
-       templateDir =
-
 
 # NON-GIT SETTINGS
 
 [annex]
        # My SSH config already uses ControlMaster where appropriate.
        sshcaching = false
+       # Don't upgrade repositories automatically
+       autoupgraderepository = false
+       # Force `git add` to add to git, never to annex
+       gitaddtoannex = false
+       # Consider dotfiles to be `git annex add`able; restrictions of
+       # annex.largefiles (if set) are still applied
+       dotfiles = true
 
 # vim: ft=gitconfig