0

I created a git repo with some of my projects, the folder structure looks something like this:

workspace
- project1    
- project2  
- ...
- run

while run is a folder that all of them use.

I didn't know how to do it so I just named commits like this:

[Project1] updated this
[Project2] fixed that
[Project2] added this feature
...

So, is it possible to split the projects to independent branches? the run folder should also be included in the work-space and used by all projects.

Juergen
  • 12,378
  • 7
  • 39
  • 55
TeNNoX
  • 21
  • 1
  • 4

1 Answers1

0

What you could do

What you want is rather different repos than different branches.

In practice you could:

Why I believe you don't want to use branches

As far as I understand you'd like to try a workflow which would look like:

A - B - C - D - E (branch for project1)
          \
            F - G (branch for project2)

Where

  • C is your current commit
  • D and E are commits made when you worked only on project1
  • F and G are commits made when you worked only on project2

In practice, if you want to work on project1 you're going to checkout E. So your workspace will look like

workspace
- project1 in the state of commit E   
- project2 in the state of commit C
- ...
- run

What I mean is you'll keep each project in your workspace, all be frozen at commit C except the one you're working one. Which, I believe, isn't what you're looking for.

Community
  • 1
  • 1
gturri
  • 13,807
  • 9
  • 40
  • 57