0

I've used Atlassian's svn-migration-scripts.jar as we migrate from svn to git, and have followed the associated instructions (https://www.atlassian.com/git/tutorials/svn-to-git-prepping-your-team-migration)

It seemed that everything has gone fine, including syncs of additional content as we flex muscles and do checks and such. However, I'm discovering that empty directories are not getting migrated. Any thoughts on this? Is there an option or a flag I neglected to consider?

mdez
  • 11
  • 2
  • 2
    git does not cover empty directories. If you want to keep an _empty_ directory, you might create a (perhaps hidden) text file explaining why it is there. Like a `README.txt` or so. – eftshift0 Jun 29 '23 at 15:58

1 Answers1

1

Yeah, I think I found my answer; while svn has no problem with them, git doesn't like empty directories, similar to ClearCase (I did a migration a while back from CC to git and this wasn't a problem because it had already been addressed while in CC). My solution will be to add a placeholder file .gitignore file to each empty directory.

Thank you @eftshift0

mdez
  • 11
  • 2
  • Don't use the filename `.gitignore`. It has a meaning in Git. I've seen several projects that used `.gitkeep` to keep empty directories. – Friedrich Jun 29 '23 at 18:27
  • Ah, I was a bit hasty. Seems the battle .gitkeep vs .gitignore is in full swing: https://stackoverflow.com/questions/7229885/what-are-the-differences-between-gitignore-and-gitkeep/7229996#7229996 – Friedrich Jun 29 '23 at 18:44