Can a GIT branch have a subset of data?

I am trying to find out if a GIT branch can have a subset of the project data like the example below.

I am working on a java, spring, maven project and my source is at

  • How to git-add only non-whitespace changes and new files?
  • SourceTree - Not sure how to go back to a previous commit
  • How to clone and integrate external (from git) cmake project into local one
  • Add all files to a commit except a single file?
  • Using the JGIT, how can I retrieve the line numbers of added/deleted lines
  • How to connect OpenShift with a private BitBucket Repository
  • src/main/java

    and my JSP pages are at:


    we are thinking of outsource the JSP pages to a diff group but we don’t want them changing the java code so we are trying to think if we can map a branch with just


    and then merge it back in

  • What are all available Git special files that can be committed to a repository?
  • I've lost both my master branch and according to GIT, my HEAD (though I could have told it that). How do I get them back?
  • JGit get pulled files
  • How do I work on the same file in GIT but on 2 different branches where I can switch easily between the 2
  • Git - replace local branch with remote branch
  • Git checkout of commit# is taking me to a different commit#
  • One Solution collect form web for “Can a GIT branch have a subset of data?”

    One way would be to export the history of that webapp directory an an independent git repo, used within the current (parent) repo as a submodule.
    That way, you are sure the external contributor doesn’t modify any source except the ones you want.

    The other (simpler) way is to create a branch dedicated for the other group of contributors, and accept merges only through pull request (that you would reject if any file outside of webapp is modified)

    Git Baby is a git and github fan, let's start git clone.