0

I'm converting a repository from svn to git with subgit and it generates some empty commits because there are some folder only commits.

Is there any way to filter out them, preferably in the conversion process?

1 Answers1

2

Yes, you can specify

[translate] 
    createEmptyGitCommits = false

in subgit/config file (you can set that anytime, but the best of all is to set that immediately after subgit configure step) and run

$ subgit install path/to/repository

to apply changes. Since that moment empty Git commits won't be created when translating new SVN revisions, older (already translated) empty Git commits won't be removed in order not to change SHA-1 hashes in the Git repository.

Dmitry Pavlenko
  • 8,530
  • 3
  • 30
  • 38
  • Any guide to have a list of all these options? That would be very useful – Marco Mondini Sep 17 '15 at 17:14
  • 2
    At the moment of writing these lines, the best documentation on the options are in subgit/config file comments. We're working on official documentation on our website and it will be updated soon. But what about this option (`createEmptyGitCommits`; and a similar one in the opposite direction: `createEmptySvnCommits`), for now it's a hidden undocumented option like some others that was created for one of our clients. Probably we will make it officially public and add official documentation on it at some of the future releases. – Dmitry Pavlenko Sep 17 '15 at 22:26