From e1cc03dd4d7333b96aefd8ec23a0ae0da34b583b 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 ab3e536a..e8fd2ce4 100644 --- a/gitalias.txt +++ b/gitalias.txt @@ -795,6 +795,9 @@ save = stash push pop = stash pop + # 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