]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - gitconfig.m4
gitconfig: Add alias to "backup" uncommitted changes (ssb).
[config/dotfiles.git] / gitconfig.m4
index 263723c519c1e4029eefd3bf003f3302ad1c8cfb..5b16dad41d26b9f5a2681ac3542cf2e3a0ef091e 100644 (file)
@@ -42,14 +42,17 @@ include(../lib.m4)
 
 [core]
        editor = vim
-       # Can't use ~/ because of older git versions.
-       excludesfile = GITIGNORE
 
 # Use pager for the following commands.
 [pager]
        status = yes
        tag = yes
 
+[interactive]
+       # Don't require <Return> in interactive commands which require only a
+       # single key, for example `git add --patch`.
+       singlekey = yes
+
 [alias]
        ## Shortcuts for often used commands.
        #
@@ -119,6 +122,11 @@ include(../lib.m4)
        # tig = log --pretty=oneline --graph --all --decorate --abbrev-commit
        tig = ! TIG | less
 
+       # Create backup of uncommitted and untracked changes.
+       ssb = "! git stash save --include-untracked \
+                               \"Backup on $(date -R)\" >/dev/null \
+             && git stash apply >/dev/null"
+
 [diff]
        # Detect copies and renames.
        renames = copy
@@ -157,7 +165,7 @@ FI
        # replies to the first one.
        thread = shallow
 
-[receive]
+[transfer]
        # Automatically fsck objects when receiving them (respected by git
        # receive-pack and git fetch (>= 1.7.8, for fetch)).
        fsckobjects = true