When transitioning from SVN to Git, it’s important to note that Git manages repositories differently. In SVN, you’re used to organizing projects in a folder/subfolder structure, but Git treats each project as a separate repository.
While Git submodules can link repositories within a parent repository, it’s not quite the same as SVN’s folder system. Submodules are designed for cases where projects are dependent on one another (like libraries), and they have their complexities (e.g., version sync between submodules).
If you want to maintain a structure similar to what you had in SVN (like an “Android” folder with subfolders for multiple projects), consider these alternatives:
Multiple Repos in One Directory: Create a parent folder on your local system (e.g., “Android”), and inside it, clone your Git repositories. Each project will have its own repository, but they will still be organized under one parent folder for convenience.
Git Submodules: If you really need to manage multiple projects inside a single repository, you can use Git submodules. Submodules allow you to keep separate Git repositories in specific directories of your main repo. Be aware though, managing submodules can be tricky if you’re not careful with updates.
Monorepo: You could also look into the monorepo approach, where you maintain multiple projects within one large repository. This can be useful if your projects are closely related, but it comes with its own challenges (e.g., scaling, dependency management).
For your use case, simply organizing repositories under a common directory without submodules might be the simplest and cleanest approach.
Let me know if you need any help setting up Git!
yaniv man wrote:Hello
I'm used to working with svn , but I wish to convert to git.
I'm used that in svn I work with folders and subfolders
say main folder is Android and under it i will place all my android projects
the next could be Java and under it my java code
but in git there is only the concept of repository, so each project gets a repository
I found in git the concept of submodule, but I do not think it is the same
How do i maintain multiple projects in a tree structure in git?