Created
September 28, 2020 07:42
-
-
Save georgeyord/b47c59da232938f94af76f02e393a9ce to your computer and use it in GitHub Desktop.
Mirror git repo to different repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Create a teml working dir | |
mkdir -p /tmp/repo-move | |
cd /tmp/repo-move | |
# Clone the original repo | |
git clone --bare [ORIGINAL_REPO] | |
# Push to target repo | |
git push --mirror [TARGET_REPO] | |
# Do some joanitor work | |
#[ORIGINAL_REPO]: Archive | |
#[TARGET_REPO]: Branch protection + Acess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment