GitLab Migration Rehearsals: What to Verify Even When Commit Counts Match
Matching commit counts and default branches mean nothing if a release tag points at a different commit, because the old delivered build changes. A tag mismatch reproduced in a small Git repository, the command that shows which commit a tag resolves to, and five samples covering reviews, accounts, protection rules and attachments.
The migration report reads: "Source commits: 2. Target commits: 2. Default branch matches." All three are true. But when someone checked out v2.1, the version delivered to a customer, the receipt layout was different.
In a repository migration check, matching commit counts and default branches are not evidence that past deliveries are identical. You have to compare the commit each release tag points to, and the files in that commit.
Can the delivered build differ when commit counts match?
We reproduced this in a small Git repository. The first commit stored layout=classic, the second layout=compact. We tagged the second commit v2.1, cloned the repository, and in the rehearsal clone only, moved the tag to the first commit. The values below are what we actually observed in that repository.
| Observed value | Source | Rehearsal clone |
|---|---|---|
| Commits reachable from all refs | 2 | 2 |
Commit on main | 08c64bffa | 08c64bffa |
Commit v2.1 points to | 08c64bffa | 7ee4516b1 |
receipt.template at v2.1 | layout=compact | layout=classic |
Both repositories have the latest layout on the default branch. The difference only appears when you pull an old delivery out by its release name. The IDs above are shortened to nine characters; a real migration check compares full IDs. You can resolve the commit a tag ultimately points to with git rev-parse, for example git rev-parse 'v2.1^{commit}'.
What besides Git objects needs checking?
For a team on GitLab, the acceptance scope is wider than Git objects. Review discussions, user mapping, protection rules and attachments are part of how the team works. GitLab's project import/export documentation notes that what an export includes varies by version, and that file-based exports leave out some items such as CI/CD job logs and artifacts. Compare samples using the version and migration method you're actually using.
| Sample | What to do before and after migration |
|---|---|
| One production release tag | Check out the same commit and files, and open the release notes and downloadable assets. |
| One review comment on a code line | Confirm which change it discussed and whether replies and resolved state came along. |
| One account that was active before | Check the original Git author info and the mapping of the platform account that left reviews, separately. |
| One protected branch | Test that a regular developer can't push directly and that the defined review flow can merge. |
| One private attachment | Confirm an authorized user can open the same file as the source and an unauthorized user cannot. |
What if the new tool can't hold the old review format?
Sometimes the new tool can't carry old reviews in their original form. In that case, write into the migration scope what original you'll preserve, the read-only access path, who may view it, and how to find it from the new records. A migration sign-off only means something once operations can pull out the real delivered build and auditors can reread the approval evidence from that time.
If the repository came from SVN, the table that leads from old revision numbers to new commits belongs in the same check. That's covered in Finding changes by old SVN revision numbers after moving to Git.
- #git
- #migration
- #scm
- #audit
- #traceability