Skip to main content

Multiple Origins

Pushing to multiple origins ensures that a repo is always available. While I use Gitlab as my main repository, I might want to mirror it to Bitbucket, Github, or another GitLab for redundancy.

As an example, if my server ever needed to be rebuilt it would be much easier to clone my services repository from a mirrored copy on Bitbucket than jump through the hoops of getting Gitea set back up—especially since the docker-compose configuration file for Gitea is stored in that very same services repository.

Push to two origins

git remote set-url --add --push origin git://original/repo.git
git remote set-url --add --push origin git://another/repo.git