Giter Site home page Giter Site logo

sync-git-mirror's Introduction

Sync Git Mirror

sync-git-mirror.sh syncs a git repository to a mirror or fork repository, including all branches and tags. Keep your git mirrors and forks up to date.

Git above 2.29.0 is required.

$ sync-git-mirror.sh
Sync Git Mirror - Keep your git mirrors and forks up to date.
https://github.com/ElfSundae/sync-git-mirror

Usage: sync-git-mirror.sh source mirror [<options>]

`source` can be a remote URL or a local path of working copy
`mirror` should be a remote URL

Options:
        --path=           Path to clone
        --mirror-name=    Git remote name of mirror, default is "mirror"
        -h|--help         Show this usage

Examples:
    sync-git-mirror.sh https://github.com/foo/bar [email protected]:username/bar.git
    sync-git-mirror.sh /path/to/working/copy [email protected]:username/name.git
    sync-git-mirror.sh https://github.com/foo/bar.git [email protected]:username/bar.git \
        --path=/data/mirrors/bar

If you have many mirrors to sync, you may like to use sync-my-git-mirror.sh which makes life easier.

โš ๏ธ You need to change the MIRROR and REPO_PATH variables before using sync-my-git-mirror.sh:

# Mirror repo URL for the repo name
MIRROR="[email protected]:ElfSundae/$REPO_NAME.git"
# The default local path to clone the source repo
REPO_PATH="/data/mirrors/$REPO_NAME"

Examples:

# Sync the current working repo
sync-my-git-mirror.sh .

# Sync a local repo with different name
sync-my-git-mirror.sh ~/path/to/repo RepoName

# Sync a remote repo, clone to the default path
sync-my-git-mirror.sh git://path/to/repo.git

# Sync a remote repo with different name, clone to the default path
sync-my-git-mirror.sh git://path/to/repo.git RepoName

sync-git-mirror's People

Contributors

elfsundae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.