Re: Use of Git with local folders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Felipe,

"Felipe Bustamante" <fisadmaster@xxxxxxxxx> 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux