]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
gitconfig: Add alias to "backup" uncommitted changes (ssb).
authorSimon Ruderich <simon@ruderich.org>
Mon, 11 Mar 2013 16:41:42 +0000 (17:41 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 11 Mar 2013 16:41:42 +0000 (17:41 +0100)
gitconfig.m4

index 66c73761245e5a4aad1706b131a88be64ab74382..5b16dad41d26b9f5a2681ac3542cf2e3a0ef091e 100644 (file)
@@ -122,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