Moving from GitLab or GitHub to GitMoon: a practical guide

Mirror clones, bundles, the things Git does not move, SSH keys, and an honest list of what GitMoon can take today. The checklist I use for any move between Git hosts.

By Laercio Borges

· 6 min read

People ask me some version of this every week: "Can I just move my GitLab project to GitMoon?" The short answer is: part of it, and you should know which part before you start. This guide is the checklist I use for any move between Git hosts, plus an honest section on what GitMoon can take today.

Most of the steps below are useful even if you never move. A good backup and a clear list of what your project depends on are worth having anyway.

Step 0: write down why you want to move

One sentence is enough. "Our repositories should be private by default." "We want a cheaper plan for a small team." "We want the apps we build with AI, and their history, in one place."

The reason tells you what to test first. If the reason is CI pipelines, merge request rules or issue boards, stay where you are for now. GitMoon does not have those today.

Step 1: make a full backup that you control

Before you change anything, take a complete copy of every repository. A normal clone is not enough, because it only creates your default branch locally. Use a mirror:

git clone --mirror git@gitlab.com:acme/shop.git shop.git
cd shop.git
git count-objects -vH

A mirror has every branch, every tag and every other ref. To keep the whole thing as one file you can store anywhere, make a bundle and check it:

git bundle create ../shop.bundle --all
git bundle verify ../shop.bundle

You can restore it later with git clone shop.bundle shop. Keep the bundle somewhere that is neither the old host nor the new one. A boring external drive is fine.

If the project uses Git LFS, the mirror does not include the large files. Run git lfs fetch --all inside the mirror as well, or you will keep pointers to files that no longer exist anywhere.

Step 2: list what lives outside Git

This is the part people forget. Git moves your code, commits, branches and tags. It does not move the things the platform built around them.

Lives in Git (a mirror keeps it)Lives in the platform (needs its own export)
Every file and its full historyIssues and their comments
Branches and tagsMerge requests or pull requests, and reviews
Commit authors, dates and messagesCI/CD pipelines and their variables
Submodule referencesReleases, attachments and webhooks
Deploy keys, access tokens and members

On GitLab, the project export in the project's settings creates a file with issues, merge requests and more. On GitHub, the gh command line tool can save issues and pull requests as JSON:

gh issue list --repo acme/shop --state all --limit 1000 --json number,title,body,state > issues.json
gh pr list --repo acme/shop --state all --limit 1000 --json number,title,body,state > prs.json

Wikis on both GitHub and GitLab are separate Git repositories. Mirror them too:

git clone --mirror git@gitlab.com:acme/shop.wiki.git

Pay special attention to CI variables. They often hold production secrets. Write down their names, not their values, so you know what you will need to create again. Better still, plan to give them new values.

Step 3: clean up before you move

A move is a good moment to fix old mistakes.

  • Scan the history for secrets. Tools such as gitleaks or TruffleHog can scan every commit in the mirror, not only the latest files.
  • Rotate first, rewrite second. If you find a real secret, change it at the provider before anything else. Removing it from history is useful, but the key is already out.
  • Look for large files that do not belong in Git, such as database dumps, build output or videos.
  • Delete branches nobody uses. git branch -r --merged origin/main shows remote branches that are already merged.

If you want the full process for a leaked key, I wrote it down in how to protect your Git repositories.

Step 4: name remotes by host

Working with two hosts for a while is normal. Give each remote the name of its host instead of origin, so you always know where a push goes:

git remote rename origin gitlab
git remote -v

When you add another host later, use git remote add <name> <url>, and push with the remote name every time: git push gitlab main. It feels slow for a day, then it becomes a habit, and it prevents the classic mistake of pushing a private branch to the wrong place.

Step 5: set up your GitMoon account and keys

Create an account at gitmoon.dev. You can sign in with Google or with email and password. The Starter plan is free.

Make a new SSH key just for GitMoon instead of reusing an old one:

ssh-keygen -t ed25519 -C "ana@example.com gitmoon" -f ~/.ssh/gitmoon_ed25519
ssh-keygen -lf ~/.ssh/gitmoon_ed25519.pub

In the GitMoon dashboard, open Settings, then SSH & GPG Keys, and paste the contents of the .pub file. GitMoon shows a SHA256 fingerprint. Compare it with the line ssh-keygen -lf printed. They must be the same. Never paste the private key, the file without .pub, into any website.

Then create your repository in the dashboard. It starts as private. You can add branches, tags and releases there, and keep it private until you decide otherwise.

Where GitMoon stands today

Please read this part before you put dates in a calendar.

  • There is no git push or git clone to GitMoon over SSH or HTTPS today. GitMoon stores your SSH public keys and shows their fingerprints, but there is no Git endpoint to push to.
  • Files reach GitMoon repositories through the Service API. Partner apps use it. Every app saved in Vertal Dev, for example, is committed to its own private GitMoon repository this way, one commit per saved version.
  • There is no importer for GitLab or GitHub projects, and no issues or pull requests inside GitMoon.
  • What works now: private repositories by default, branches, tags and releases in the dashboard, AI code review paid with tokens, the Explore feed and Kudos for repositories you choose to make public, and SSH key and API key management.

So the realistic plan today is this. Keep GitLab or GitHub as the place where your team pushes every day. Keep your mirror and your bundle as your own backup, outside any platform. Use GitMoon where it is strong now, for example as the home for apps you build with Vertal Dev. That is not the answer a sales page would give you, but it is the true one.

A checklist you can copy

  1. Mirror clone of every repository, plus its wiki.
  2. A verified bundle, stored outside both hosts.
  3. Git LFS objects fetched, if you use LFS.
  4. Issues and merge requests or pull requests exported.
  5. CI variable names listed, and secrets given new values.
  6. History scanned for secrets, large files removed, old branches deleted.
  7. Remotes named after their host.
  8. A new ed25519 key added to GitMoon, fingerprint checked.

FAQ

Can I import a GitLab project into GitMoon directly?

No. GitMoon has no importer today. Keep a mirror and a bundle of the project as your own backup, and keep pushing to your current host.

Will I lose my commit history if I change Git hosts?

Not if you use git clone --mirror. The history lives inside Git, so a mirror keeps every commit, branch and tag. Issues, reviews and CI settings live in the platform and need their own export.

Do I need to rotate secrets when I change hosts?

Yes, for any secret that was ever in the repository or in CI variables. A move is a good moment to give every secret a new value and to keep the old ones out of the new place.

Is GitMoon a GitLab alternative?

For private repositories, AI code review and code from AI app builders, it can be. For teams that need CI pipelines, merge requests and issue tracking, GitLab is the better fit today.

Try GitMoon

The Starter plan is free. It has 5 repositories, private by default, and 2,500 AI tokens each month.

Keep reading