X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=vcs%2Fgitconfig.in;h=1c42cdfd28230dfa34aac67dd9f1ba97fed27ef0;hp=50d88a9191c495a5cddd5f3d645e929c3983a6e9;hb=d94ce439cce4ee12e391be2e082905347c628bf3;hpb=b82ea1844de8988bac632a588c6308b22b5ac1a0 diff --git a/vcs/gitconfig.in b/vcs/gitconfig.in index 50d88a9..1c42cdf 100644 --- a/vcs/gitconfig.in +++ b/vcs/gitconfig.in @@ -1,6 +1,6 @@ # Global Git configuration file. -# Copyright (C) 2011-2017 Simon Ruderich +# Copyright (C) 2011-2018 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 @@ -44,9 +44,6 @@ [core] editor = vim - # Global gitattributes file. Thanks to canton7 in #git on Freenode - # (2011-11-09 13:23 CET). - attributesfile = PWD/gitattributes [pager] # Use pager for the following commands. @@ -65,7 +62,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 @@ -79,7 +76,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 @@ -128,9 +125,9 @@ fg = ! git fs && git gc --aggressive 2>&1 # fsck and compress repo ## Misc. sl = stash list - ss = stash save - ssk = stash save --keep-index - ssu = stash save --include-untracked + ss = stash push + ssk = stash push --keep-index + ssu = stash push --include-untracked sa = stash apply --index sp = stash pop --index @@ -144,8 +141,8 @@ tig = ! PWD/bin/tig.pl # Create backup of uncommitted and untracked changes. - ssb = "! git stash save --include-untracked \ - \"Backup on $(LANG=C date '+%a, %d %b %Y %H:%M:%S %z')\" \ + ssb = "! git stash push --include-untracked \ + -m \"Backup on $(LANG=C date '+%a, %d %b %Y %H:%M:%S %z')\" \ >/dev/null \ && git stash apply >/dev/null" @@ -177,6 +174,10 @@ # 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 @@ -191,16 +192,18 @@ # addition. See t/ for some tests and examples. wordRegex = [a-zA-Z0-9_]+|[^a-zA-Z0-9_] -# Allow diffing of some binary files. +# Rules to allow diffing of some binary files. Disabled by default to prevent +# 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 # which are passed after ARGV0 by git. -[diff "gzip"] - textconv = gzip -d -c -[diff "pdf"] - textconv = sh -c 'exec pdftotext "$@" -' ARGV0 -[diff "sqlite"] - textconv = sh -c 'exec sqlite3 "$@" .dump' ARGV0 +#[diff "gzip"] +# textconv = gzip -d -c +#[diff "pdf"] +# textconv = sh -c 'exec pdftotext "$@" -' ARGV0 +#[diff "sqlite"] +# textconv = sh -c 'exec sqlite3 "$@" .dump' ARGV0 [log] # Display branches/tag names in log (same as log's --decorate option). @@ -239,11 +242,25 @@ # Disable annoying advice messages. waitingForEditor = false +[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 + # 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