1

Reading several questions and some discussion on the web, like Can I arrange repositories into folders on Github?, I still don’t know how to get this working. For the moment I add the “folder name’ in front of the project, but is of course bad practice.

In my github Repository I would to separate the different kind of projects into their own folder. F.e Documentation projects and Repositories in the Documents folder, Packages in their folder, Gists in the Gist folder; of course if we can talk about folders.

How can I accomplish that; what should the remote path look like?

Any suggestions about this? I know f.e how to add several Gists in one repository by using git init in the parent folder but now to create or move it to a parent ‘folder’.

A script is also welcome if that exists.

Thank you in advance.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
iPadawan
  • 898
  • 1
  • 12
  • 23

1 Answers1

1

I would use submodules.

Step 1: Create those projects as separate repositories: Documentation, Packages, Gists.

Step 2: Create a main repository, and add the repositories created on Step 1 into main repository as a submodule.

That way you have everything separated into their own folders with their own history of commits and branches. Keep adding/committing to them as separated repos, but you can see them all in one place as folders in the main repository.