Giter Club home page Giter Club logo

git-bak's Introduction

git-bak

Simple almost-one-click Git backups.

Fully backups and archives a Git repository in a tar ball. The backup archive is equipped with a convenient script to directly clone it with a single (double-)click or by calling it.

just a single click

Overview

Output from --help argument:

$ ./git-bak --help
NAME
    git-bak - Backup a Git repository

SYNOPSIS
    git-bak [-x] [-f archive] -u url

DESCRIPTION
    Backups a Git repository by bundling it with all its references. The bundle is then packed as tar ball.
    The archive will be placed in the current directory by default.

    Unless otherwise specified via '-x' or '--no-script', a simple script to conveniently clone the bundle into
    the current directory is added to the archive.

OPTIONS:
    -f, --file <FILE>   Custom path for the generated tar ball
    -u, --url <URL>     Tells which url to clone the Git repository from
    -h, --help          Shows this help message
    -v, --verbose       Increases verbosity
    -x, --no-script     Skips creation of the clone script

EXAMPLES:
    Backup a remote repository that is saved as 'repo.tar.gz' in the current directory along with the clone script.

        git-bak -u https://example.com/projects/repo.git

Example Usage

Create the Backup

$ ./git-bak -u https://github.com/jazzschmidt/git-bak.git -f archive.tar.gz

Unpack the archive somewhere

$ tar -xzf archive.tar.gz
$ ls -loh
total 112
-rw-r--r--  1 user    23K Apr 16 17:16 archive.tar.gz
-rwxr-xr-x  1 user   163B Apr 16 17:16 checkout
-rw-r--r--  1 user    24K Apr 16 17:16 gitbundle

Clone the repository

Either directly click on the checkout script or call it from the terminal. By using the latter, it is also possible to define another directory to clone to.

$ ./checkout ~/workspace/project
Cloning into '/Users/user/workspace/project'...
Receiving objects: 100% (190/190), 23.97 KiB | 7.99 MiB/s, done.
Resolving deltas: 100% (77/77), done.

git-bak's People

Contributors

jazzschmidt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

pa-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.