I am going to clarify the working conditions to explain why we have worked in this way.
The computer for development is in a completely isolated work environment, without connection to any data network, all data ports are disabled (network, USB, Bluetooth, etc.) so there is no possibility of copying the source code towards a more open environment.
This computer only has Visual Studio 2022 installed, no other type of software has been installed, which is why it is impossible to create branches from the master since VS 2022 does not allow branches connected to local directories.
The only way that could be used to isolate daily changes was to create a directory each day, by means of a copy from Windows File Explorer, containing the changes made during the last and previous days.
The structure of the project would be as follows:
-
CS_2024-04-10 directory, this is the original directory containing the original source code. This directory was converted to a GIT repository using VS 2022 which allows us to have the master branch. Because of the above, this directory contains the hidden .git directory.
-
The next day, a copy of the original directory was made, and this copy was named CS_2024-04-11. Because of this, this directory contains the hidden .git directory of the original. We worked on this copy by opening the project in VS 2022 and making various changes and then saving the results.
-
The previous process has been carried out for two weeks, so there are 10 source code directories which include the changes made during each workday plus the changes from the respective previous day, for example, the directory CS_2024-04- 16 contains all the changes made from day 10 to day 15 plus the changes made during day 16.
Now, what we need is to know if it is possible to convert all these sequential directories into a GIT structure with change control such as the first directory with the master branch and then branches that can be associated with each subsequent directory.
I have installed, to support the idea, the GIT program. For this reason, now the development computer only contains two software for development, Visual Studio 2022, and GIT.
How would it be possible to create branches from the master branch, using the original directory CS_2024-04-10 and associate these branches with the sequential directories created?
Using git worktree does not help since the directories must be empty and, after creating the new branch, replacing the content with the existing content in the previous directories does not work.