-1

I have performed SVN to GIT Migration using subgit utility and the migration went well. I have pushed the resulting bare repository to Git. After the Migration I have noticed that the total number of commits in Git Repository is just 13500 where as the last revision number is SVN is 37380.

So as my per understanding in git I need to see 37380 commits? Is my understanding correct?

Additional Note: When compared the total commits in Git vs Total Revisions in SVN. It doesn't match. Git seems to be missing around 22125 commits (i.e 37530-15405=22125 commits). But the migration didn't give any errors. So wondering what would be wrong?

What is the best way to check what is missing in Git?

Git Total Commit Count:

$ git rev-list --all --count
15405

Total Revisions in SVN:

37530

Update 2: Subgit Verify shows everything is good

# ./subgit-3.3.15/bin/subgit verify jdmessenger.git
SubGit version 3.3.15 ('Bobique') build #4442
  (c) TMate Software 2012-2021 (http://subgit.com/)

Verifying repository at '/opt/apps/jdmessenger.git'.

    Subversion revisions verified: 37530
    Mirror is operating normally.


# cd jdmessenger.git (Git Bare Repo)
# git rev-list --all --count (Total Commits in Bare Repo)
48425
# git clone repo_url (Total Commits in Actual Repo)
# git rev-list --all --count
15278
Maryo David
  • 539
  • 1
  • 7
  • 18
  • How are you counting the total number of commits in git? Possibly you're not comparing like with like. – IMSoP Jul 23 '22 at 07:08
  • I was looking into the total commits under each branch and summing it up.. Is there any other easy way to count the total number of commits in a git repo? – Maryo David Jul 23 '22 at 07:16
  • I would count the commits with `git rev-list --all --count`. – j6t Jul 23 '22 at 07:24
  • @MaryoDavid If anything, that would be an *overestimate*: in git, you can't really distinguish between "commits that are unique to this branch" and "commits that are part of this branch's history because they are part of its parent branch's history", so adding up across branches will double-count commits. Try the command j6t gave instead. – IMSoP Jul 23 '22 at 07:26
  • Updated the description with some additional detail. Git seem to have less commits. – Maryo David Jul 23 '22 at 07:50

1 Answers1

0

Starting with subgit 3.3.0 you can use subgit verify to verify consistency of mirrors and determine if SVN commits are missing from your Git repository. Also, have you tried following the official Git Book chapter on Migrating to Git? If subgit verify doesn't work, maybe try creating a separate local repo and following the git book steps to see if you get different results.

ElderFuthark
  • 496
  • 2
  • 11
  • subgit verify shows everything is good.. I am bit confused in the number of commits in git vs number of revisions in SVN Repo. – Maryo David Jul 24 '22 at 14:15