0

I'm a QA and I will have to maintain multiple scripts belonging to multiple modules, of many projects of one Organisation. To make it easier -

Organisation X has 3 Projects - A,B,C
Each Project has 3 Modules
Each Module has 10 functionalities, so 10 test scripts.

My challenge is that I need to maintain all these test scripts under a single Git Project with my team name. Therefore I attempted the following:

Created a Git Project with my team name
Created 3 repositories inside, for 3 projects
Created 3 different branches under each repo for the modules

Now to maintain 10 different version of test scripts under a branch, what is the best strategy? If just push all 10 scripts together, if I pull one of the modules with an intention to make changes to only one of the scripts, I will still have to checkout all scripts, which I do not want.

Is it a good idea to again have 10 branches inside a branch created for module? Or using tags for each script avoids all scripts being checked out when I take a pull? Please suggest.

We are using BitBucket.

  • Is there a particular reason to why you would not want to checkout all the scripts? – danielorn Apr 14 '20 at 17:19
  • @danielorn - That is because of the size and number of scripts in a branch. The number of scripts will only increase over time, also size can be significant. I do not want users to download such huge content given the time and machine space are limited. – Shantharam Puranik Apr 15 '20 at 05:59

1 Answers1

0

The closest thing you have to nested git repositories would be git submodules, but that is usually used when you need to use another project from within the current git repository, which does not seem to be the case here, it will also not work if you are limited to a single repo.

If you are limited to only one repo and your scripts aren't huge I would not worry to much about having them in the same repository in a folder structure like the below:

project A
 |- module A1
     |- functionA1.1
     |- functionA2.1
     |- functionA3.1
     |- ...
 |- module 2
     |- ...
 |- module 3
project B
 |- ...
project C

If really important you can control what is checked out in the working using git-sparse-checkout

danielorn
  • 5,254
  • 1
  • 18
  • 31