github-gitlab-mirror

Solid

Audits or synchronizes the authoritative GitHub main branch to the internal GitLab mirror without importing GitLab-only history back into GitHub. Use when checking GitHub/GitLab consistency, updating the internal mirror, or resolving a divergence between the two remotes.

Code & Development 2,355 stars 245 forks Updated 3 days ago NOASSERTION

Install

View on GitHub

Quality Score: 83/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# GitHub to GitLab Mirror GitHub `main` is the single source of truth. GitLab exists to build and deploy the same commit internally. ## Safety Rules - Discover both remotes from their URLs; do not assume they are named `origin` and `gitlab`. - Never merge, cherry-pick, or push GitLab-only commits into GitHub. - A fast-forward update to GitLab may proceed after verification. - Rewriting a divergent GitLab branch requires explicit user authorization and an exact `--force-with-lease` expectation. - Do not change the local branch or working tree to mirror remote refs. ## Status 1. Fetch both authoritative refs: ```bash git remote -v git fetch <github-remote> main git fetch <gitlab-remote> main ``` 2. Record both SHAs and show commits unique to either side: ```bash git rev-parse <github-remote>/main git rev-parse <gitlab-remote>/main git log --oneline <gitlab-remote>/main..<github-remote>/main git log --oneline <github-remote>/main..<gitlab-remote>/main ``` 3. Classify the relationship: - Equal: already mirrored. - GitLab is an ancestor of GitHub: safe fast-forward. - GitHub is an ancestor of GitLab: GitLab contains mirror-only commits. - Neither is an ancestor: the remotes diverged. ## Synchronize For a verified fast-forward: ```bash git push <gitlab-remote> <github-remote>/main:refs/heads/main ``` For a GitLab-ahead or divergent branch, stop and display the GitLab-only commits. An explicit request to restore GitLab a...

Details

Author
AgentsMesh
Repository
AgentsMesh/AgentsMesh
Created
7 months ago
Last Updated
3 days ago
Language
Go
License
NOASSERTION

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category