From 7dabc91fe233f685e7d67c6e44b9a6aed0e44d84 Mon Sep 17 00:00:00 2001 From: Romain Dartigues Date: Wed, 4 Sep 2019 15:52:02 +0200 Subject: [PATCH] Add: backup-branch --- gitalias.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitalias.txt b/gitalias.txt index 96976b6a..42630956 100644 --- a/gitalias.txt +++ b/gitalias.txt @@ -1103,6 +1103,9 @@ # clone-lean = clone --depth 1 --filter=combine:blob:none+tree:0 --no-checkout + # Save the current branch (for example, prior a rebase) + backup-branch = !"git branch backup/$(date +%F/%H-%M-%S)" + # Stash snapshot - from http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ # Take a snapshot of your current working tree without removing changes. # This is handy for refactoring where you can't quite fit what you've done