0

I'm trying to push a Grails project to a Git repository (GitLab). If another user imports this project, there are several files missing (domain classes, controller, java src, groovy src ...) which results in buildpath errors.

The project is just a sample project with a lot of empty folders. Is there a way to push all folders including empty ones?

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156
Christian
  • 821
  • 1
  • 11
  • 26
  • possible duplicate of [How can I add an empty directory to a Git repository?](http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository) – cfrick Apr 16 '15 at 12:11
  • Why would empty folders affect the build? This sounds like not everything was pushed to the repo. – Tim Biegeleisen Apr 16 '15 at 12:13
  • Try using `git ls-files --others --exclude-standard` in one of the folders where files are "missing" on the repo. – Tim Biegeleisen Apr 16 '15 at 12:15

1 Answers1

0

You should be able to run grails compile after pulling the code from the repo and Grails will create missing folders.

Additionally, one trick I've seen is to create a hidden file, by convention .gitkeep, which is meaningless but causes an "empty" folder to be created.

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156