Repository mirroring helps you keep two repositories in sync — for example, whenever you push changes to GitLab, they can automatically appear in GitHub.
- Creating backups of your GitLab repository on GitHub.
- Working together across multiple platforms.
- Maintaining both public and private versions of the same project.
- Automating updates so both repositories always stay up to date.
Create a repository with README.md file
Set up your project to automatically push or pull changes to/from another repository. Branches, tags, and commits will be synced automatically.
Open your project → Settings → Repository → Mirroring repositories. Click ** mirror repository**. For Git repository URL use the HTTPS push URL in this form:
(https://github.com/ireshkanashetti/mirror-repo-github)
When prompted for a password, paste the GitHub access token and save.
Open git bash and Clone repository
(https://gitlab.com/ireshkanashetti/mirror-repo-gitlab)
cd to repository
cd <Repository_Name>
Create a file(index.html)
nano index.html
Add File Containt
git add index.html
git commit -m "message"
git push -u origin main
-
By completing these steps, you can successfully mirror your GitLab repository to GitHub, keeping your codebase synced, backed up, and accessible on both platforms.
-
This setup ensures a consistent workflow, encourages team collaboration, and provides extra reliability for your projects.
-
Using GitLab’s push mirroring, the process stays automatic, secure, and time-saving, ensuring your repositories remain up to date at all times.





