Skip to content

Instantly share code, notes, and snippets.

@ironheart122
Created February 14, 2021 14:43
Show Gist options
  • Save ironheart122/a5579698db56ae852b376676d26e4459 to your computer and use it in GitHub Desktop.
Save ironheart122/a5579698db56ae852b376676d26e4459 to your computer and use it in GitHub Desktop.

Revisions

  1. ironheart122 created this gist Feb 14, 2021.
    7 changes: 7 additions & 0 deletions backup_git_repo.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/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