From: Simon Ruderich Date: Mon, 11 Mar 2013 16:41:42 +0000 (+0100) Subject: gitconfig: Add alias to "backup" uncommitted changes (ssb). X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=6c3765f8f9bf89a2fb297aae14e06114ab7d13b9 gitconfig: Add alias to "backup" uncommitted changes (ssb). --- diff --git a/gitconfig.m4 b/gitconfig.m4 index 66c7376..5b16dad 100644 --- a/gitconfig.m4 +++ b/gitconfig.m4 @@ -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