Git log doesn't display latest commits fetched from remote svn repo

581 Views Asked by At

I've migrated the trunk directory of a project in svn to git using "git svn clone...". After a few commits have been made in svn, I execute "git svn fetch". This fetches the new commits in svn and checksums are generated for each commit. Now if I "git log", the commits I just fetched aren't displayed. However, if I "git show checksum" the commit is shown. The changes are probably in some remote tracking branch. How do I merge them to master?

1

There are 1 best solutions below

3
On

I recently cloned an svn over to git using git-svn, and you have to make sure that you are referencing the correct branches. SVN uses the branch 'trunk' as its "base" if you will, and when you do a git svn fetch, it takes all of the revisions onto trunk and converts them into a trunk branch in your git repo.

On the other hand, git tends to use 'master' as it's "main branch" so you are going to have to rebase master off of trunk, or merge trunk into master.