Back to articles
Git Mirroring During Migrations: `--all` vs `--mirror`
NewsTools

Git Mirroring During Migrations: `--all` vs `--mirror`

via Dev.toEmanuele Bartolesi

During a Git migration, the new platform is rarely switched on overnight. In many real scenarios, two systems must coexist for a while . For example: repositories move from GitLab to GitHub CI pipelines still run in GitLab developers start working in GitHub In this transition phase, the repositories must stay synchronized between both platforms . One common solution is repository mirroring , where changes from one repository are pushed to another remote so both systems stay aligned. Two approaches are often used for this: git push gitlab --force --all git push gitlab --force --tags or git push gitlab --force --mirror At first glance, these commands may look equivalent. They are not. The Common Approach: Pushing Branches and Tags A common way to keep two repositories in sync is pushing all branches and tags to the second remote. git push gitlab --force --all git push gitlab --force --tags These two commands are often used together during migrations. git push --all git push gitlab --forc

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles