Skip to content

🪞 Basic script to setup and sync a mirror of a git repository

Notifications You must be signed in to change notification settings

justinethier/git-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Intro

This repository provides scripts to setup a basic, no-frills mirror of a git repository.

In general the git-mirror script will be used to create and work with your mirrors.

For repos using Git LFS use git-lfs-mirror. This script supports the same commands as git-mirror and is a drop-in replacement.

Usage

The following commands are provided:

init REMOTE_REPO SERVER

Run the init command to create the initial mirror of a repository, and push that mirror to the specified server.

This command will create a bare repository on your local machine. This is not suitable for check outs so once the repository is created you will probably want to delete the directory and check our your mirror again using the clone command.

For example:

git-mirror init https://github.com/justinethier/git-mirror.git [email protected]:your-account/test.git

clone REMOTE_REPO SERVER

Clone will create a local clone of your mirrored repository and setup the local repository to track all upstream branches so we can sync them.

For example:

git-mirror clone https://github.com/justinethier/git-mirror.git [email protected]:your-account/test.git

update

Update our mirrored repository with changes from upstream. This includes updates to all tracked branches.

For example:

git-mirror update

About

🪞 Basic script to setup and sync a mirror of a git repository

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages