Create a branch for one subdirectory only

This is a conceptual question, rather than “how do I?” question.

I’m helping migrate a very big SVN repository to a Git repository for a team.
I’m simplifying a bit, but let’s assume that their current repo structure is like this:

  • Version control for Google App Engine
  • What are the pros and cons of using a trunk-based Vs feature-based workflow in Git?
  • Git push to checkout?
  • - limitations only number of users?
  • How to recover from git push -f?
  • While merging code I got some conflict error in bitbucket
  •    --trunk
           |- branch1


    They (owner team of the repo) insist, that it should go to a a single Git repository, not each project in its own. Let’s assume that I cannot persuade them otherwise. (I suspect they’ll come around, when they start using Git and understand this is impractical.)

    Each of ProjN in SVN is getting branched independently of others.

    My question about Git, when I branch, can I branch a subfolder of a repo (that is just Proj1) not the whole repo? My gut feeling is that you are always supposed to branch git at the top level. Am I wrong?

  • Repo sync fails to initialize CM13 work tree
  • Is git notes the intended way to add category-style information to a commit?
  • Include submodule commit messages with “git log”
  • Best practices for a single developer webproject setup
  • Using Git to track mysql schema - some questions
  • Commit history on remote repository
  • One Solution collect form web for “Create a branch for one subdirectory only”

    You can’t branch a subfolder. Branches always apply to the whole worktree.

    I suppose git submodules are what are you looking for. You can think of them like “nested git repositories”.

    See also Git Submodules SO Docs.

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