Skip to content

Binaries to backup your git repositories to BitBucket

License

Notifications You must be signed in to change notification settings

oshalygin/git-backup

Repository files navigation

GitHub Logo Golang Logo Bitbucket Logo

Git Backup

Backup your git repositories programmatically to BitBucket.

Release Travis Software License Coveralls Code Climate Issue Count Go Report Card GoDoc

Introduction

This is a simple and straightforward CLI utility that allows you to backup your git projects to BitBucket.

Motivation

It is common to be working on public projects on GitHub that you also want another copy of to your BitBucket account. There are a number of use cases that come to mind that might prompt you to start doing this, such as:

  • Ensuring you always have a backup in case other collaborates have force push access.
  • If you're working with microservices and you want to pull down the latest code from all of the different repositories and have a backup on BitBucket

Requirements

Without bloating the utility with a ton of required options, the git-backup depends on certain aspects being present in each of your git repositories.

  1. Make sure you have an origin remote configured. Branches will be fetched/pulled from this source.
  2. Make sure that you have a bitbucket remote configured. All branches will be pushed to this source.
# If you dont have your sources configured, you can do something along these lines:
git remote add origin [email protected]:oshalygin/git-backup.git
git remote add bitbucket https://[email protected]/oshalygin/git-backup.git

Installation

go get -u github.com/oshalygin/git-backup

Usage

Usage of git-backup:
  --path string
        The path locations where every directory will be iterated through and backed up.

Example

# Call the utility at the specified path with the 
# appropriate command line arguments.

git-backup --path=../projects

# Or use the shorthand
git-backup .  # This will run the utility and iterate over all of the folders in the current path

Command Line Arguments

path: The path that contains all of the git projects that are to be backed up.

Limitations

The utility depends on the requirements, in the future this will be expanded into CLI options.

License

MIT

About

Binaries to backup your git repositories to BitBucket

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages