Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Mirror

Mirror your public repositories between GitHub, Codeberg, and Tangled.

Joseph Hale's software engineering blog

./mirror.sh <source> <destination>

# Examples
./mirror.sh github tangled
./mirror.sh codeberg github

All you need is an account on each platform. The script guides you through the rest (dependencies, authentication, etc.)

Why this project?

I have many open source projects and regularly create new ones. So, I wanted a tool that could handle the end-to-end flow of listing each public repo from one service and mirroring them to another, creating new repos on the other as needed.

Caching

The script caches API-derived values in tmp/cache to reduce repeated API calls. If you change tokens, switch accounts, or suspect stale data, remove the cache directory:

rm -rf ./tmp/cache

Contributing

Feel free to open PRs to fix bugs or add support for new code forges. Please follow the existing patterns (preferring Bash unless impossible, minimal installations, clear error messages, etc.)

License

Copyright (c) 2026 Joseph Hale, All Rights Reserved

Provided under the terms of the Mozilla Public License, version 2.0

What does the MPL-2.0 license allow/require?

TL;DR

You can use files from this project in both open source and proprietary applications, provided you include the above attribution. However, if you modify any code in this project, or copy blocks of it into your own code, you must publicly share the resulting files (note, not your whole program) under the MPL-2.0. The best way to do this is via a Pull Request back into this project.

If you have any other questions, you may also find Mozilla's official FAQ for the MPL-2.0 license insightful.

If you dislike this license, you can contact me about negotiating a paid contract with different terms.

Disclaimer: This TL;DR is just a summary. All legal questions regarding usage of this project must be handled according to the official terms specified in the LICENSE file.

Why the MPL-2.0 license?

I believe that an open-source software license should ensure that code can be used everywhere.

Strict copyleft licenses, like the GPL family of licenses, fail to fulfill that vision because they only permit code to be used in other GPL-licensed projects. Permissive licenses, like the MIT and Apache licenses, allow code to be used everywhere but fail to prevent proprietary or GPL-licensed projects from limiting access to any improvements they make.

In contrast, the MPL-2.0 license allows code to be used in any software project, while ensuring that any improvements remain available for everyone.

About

Mirrors your repositories between GitHub, Tangled, and Codeberg.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Sponsor this project

Contributors

Languages