Skip to content

Instantly share code, notes, and snippets.

@Fishezzz
Fishezzz / mirror.sh
Last active June 11, 2022 09:53 — forked from ethomson/mirror.sh
Script to properly mirror a git repository.
#!/bin/sh
#
# Author: ethomson (Edward Thomson)
# Gist: https://gist.github.com/ethomson/3e8e9cabf360917d52a689d57bcf1729
# Article: https://edwardthomson.com/blog/mirroring_git_repositories.html
#
# TL;DR
# Hosting provider stores information about pull requests in special read-only references,
# which cause errors when you want to mirror a repository the Github way.