git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Felipe Bustamante" <fisadmaster@gmail.com>
To: "'Karthik Nayak'" <karthik.188@gmail.com>, <git@vger.kernel.org>
Subject: RE: Use of Git with local folders
Date: Fri, 26 Apr 2024 17:56:46 +0200	[thread overview]
Message-ID: <000201da97f2$579fa110$06dee330$@gmail.com> (raw)
In-Reply-To: <CAOLa=ZQyCwJO3QhLF+_ZkFWWoQ77o+0Mdrvz8hL0j-x3fdt-5A@mail.gmail.com>

Hi Karthik,

Thanks for the reply.

What you indicate allows me to create a relationship between a new branch and a new empty local directory, but what I need is to relate a branch with an existing local directory since the latter contains the changes made to the source code and I need to generate change control.

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 code. source 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:

1. 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.
2. 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.

3. 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?

Thank you very much for the help.

Felipe Bustamante
Sverige

-----Original Message-----
From: Karthik Nayak <karthik.188@gmail.com>
Sent: den 26 april 2024 12:16
To: Felipe Bustamante <fisadmaster@gmail.com>; git@vger.kernel.org
Subject: Re: Use of Git with local folders

Hello Felipe,

"Felipe Bustamante" <fisadmaster@gmail.com> writes:
> Hi,
>
> I would like to know if it is possible to combine the contents of several directories with copies of the same source code but with different changes?
>
> The stage is:
> 1. There is a directory with the original source code, without changes.
> 2. There are several directories, ordered by the date of creation, which are a copy of the original source code, copies made every day after generating changes, that is, the original source code resides in the DIR1 directory, a copy is made with name dir2, and changes are made to the source code of the project. The next day, a copy of the directory of name DIR2 is made and renamed DIR3, we work with this directory making changes to the source code. The same process is carried out for two weeks.
>
> The important question would be, is it possible to combine these directories in a repository with a Master branch (the first original directory (DIR1) and transform the other directory into branches of the master?
>
> It would be useful, if copies were made that were made on an original directory (dir1) that was already becoming a git repository, with the use of Visual Studio 2022?
>
> As an observation, the work is done on an isolated computer, without internet connection or to backup devices, the computer is fully isolated and it is necessary to generate the version control, in the case that it is possible.
>
> Any orientation in this regard would be very useful.
>
> Thanks,
>
> Felipe Bustamante
> Sverige
>

I'm not sure I fully grasp the problem, especially around why these copies are made in such a way.

But, have you looked at 'git-worktree'? This would allow you to do something like

$ cd dir1
$ git worktree add -b branch2 ../dir2

Once done with dir2, you can remove the worktree

$ git worktree remove ../dir2

But the branch ('branch2') would still remain and you can merge the branch as needed.

I hope that helps

- Karthik


--
This email has been checked for viruses by AVG antivirus software.
www.avg.com


  reply	other threads:[~2024-04-26 15:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25 16:19 Use of Git with local folders Felipe Bustamante
2024-04-26 10:16 ` Karthik Nayak
2024-04-26 15:56   ` Felipe Bustamante [this message]
2024-04-27 16:08     ` Beat Bolli
2024-04-27 17:14       ` Junio C Hamano
2024-04-27 22:02         ` Beat Bolli
2024-04-29 15:44           ` Felipe Bustamante
  -- strict thread matches above, loose matches on Subject: below --
2024-04-29 15:47 Felipe Bustamante

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000201da97f2$579fa110$06dee330$@gmail.com' \
    --to=fisadmaster@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).