From 6c3765f8f9bf89a2fb297aae14e06114ab7d13b9 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 11 Mar 2013 17:41:42 +0100 Subject: [PATCH] gitconfig: Add alias to "backup" uncommitted changes (ssb). --- gitconfig.m4 | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.45.2