Mana
Mana

Reputation: 73

How to create 2 folders in same repository?

I am working on a project that contains:

  1. Code in Angular (workspace: Visual Studio Code)
  2. Code in C (workspace: STM32CubeIDE)

Is there a convenient way in github to store both types of code in the same repository but in different folders?

Upvotes: 0

Views: 787

Answers (1)

VonC
VonC

Reputation: 1328212

If you have only one repository, any commit would be for the all repository (all the folders)

You might consider adding and committing only files from one folder.
And then adding and committing files from the other folder.

But that a process only you can follow: Git itself does not care about folders when doing the actual commit, which is a snapshot of the all repository.

Only submodules (meaning 3 repositories, one parent referencing two submodules, one repository per language) would come close of "storing both types of code in the same repository but in different folders".
Except your main repository would not "store" per se, rather reference/point to other repositories.

Upvotes: 1

Related Questions