I am creating a folder structure files on the fly using java code. After creation of folder and files I want to add both folder structure and files underneath using JGIT. I am trying to use below code
  git.add().addFilepattern(folder.getName()).call(); 
  git.add().addFilepattern(file.getName()).call(); 
but it adds only files to git repo . Is there any different way to add folders to git using JGIT
 
    