Skip to content
Create local backup branch
Perl Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
cram
.gitignore
GNUmakefile
LICENSE
README.rst

README.rst

git-branch-backup

Creates a local backup of your branch. Usefull to do before git-rebase in case it goes wrong so you do not have to go reflog diving.

Assuming you are standing on master:

$ git branch-backup
Created backup branch 'master.backup1'

$ git branch-backup
Created backup branch 'master.backup2'

et cetera.

When you are done, you can delete backups with:

$ git branch -d master.backup{1..666}

Alias for convenience:

$ git config --global alias.bb branch-backup

Dependencies

  • zsh
  • coreutils
  • sed

For tests:

Installation

# make install

Tests

$ make check
You can’t perform that action at this time.