Re: Question - .git subdirectories

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

 



On 2019-10-29 at 12:26:23, Arkadij Chistyj wrote:
> Hello. I'm not sure it's correctly to write to this email address.
> Sorry if it doesn't.
> Copy of my home directory stores on external disk under git control. I
> have devel/ directory that contains some of my old projects with git
> repositories. But main git repository in root of disk is not tracking
> and storing their contents. I don't want to use submodules or crutches
> such as renaming all .git/ in subdirectories. I just want that git
> treats my .git/ subdirs as plain dirs with any other names.
> It was already described here:
> https://stackoverflow.com/questions/2317652/nested-git-repositories-without-submodules.
> It's very simple functionality but I can't find any simple and right solution.
> I just want to know is this possible or not? If not possible, then why?

This is not possible.  You can't add a non-bare repository as a part of
a parent repository without using submodules.  Git uses the .git
directory to find the working tree and for safety reasons doesn't allow
files or directories named that to be checked in.  Allowing users to
check in .git directories would allow configuration and hooks to be
stored as part of the repository, which would allow the execution of
arbitrary code if someone cloned it and then changed into the
subrepository.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

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