Created
February 14, 2021 14:43
-
-
Save ironheart122/a5579698db56ae852b376676d26e4459 to your computer and use it in GitHub Desktop.
Backup a local GIT repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
REPOSITORY_NAME=$(basename `git rev-parse --show-toplevel`) | |
BUNDLE_FILENAME=${REPOSITORY_NAME}_`date +%d-%m-%Y""%H%M_%S`.git.bundle | |
git bundle create $BUNDLE_FILENAME develop master production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Restore a GIT repository backed up previously with git bundle tool:
git clone -b <default_branch_name> <bundle_name>.bundle <new_directory_name>