I know nothing about git. Look to others for advice in that respect. But I think I understand the various systems of organization Puppys use and would disagree with MikeWalsh's response.
Puppys operate 'in RAM'. See, viewtopic.php?p=55827#p55827 and viewtopic.php?p=63818#p63818 for a technical explanation. The following is my layman's understanding:
On boot-up, each Puppy's initrd instructs Puppy what file-systems to copy into RAM . Once copied into RAM, the content of a file-system is indexed/cataloged. Puppy's SaveFile or SaveFolder is not copied into RAM. Rather, it is just mounted and its content indexed/cataloged.
Initrd's instructions establish the priorities the various file-systems will have in RAM. As a general Rule, Puppy Devs locate essential applications in the 'core/base' file-system which usually bears the name of that Puppy in this format: for Xenialpup64, puppy_xenialpup64_7.5.sfs, for fossapup64_9.5, puppy_fossapup64_9.5.sfs. This core/base file-system contains the Puppys essential applications: applications which 'everyone' may want and/or 'defines' the essence of that Puppy. A Puppy ISO may also include an adrv.sfs --for example-- adrv_xenialpup64_7.5.sfs-- and/or a ydrv.sfs --for example-- ydrv_fossapup64_9.5.sfs. There are tools to create and/or modify them. These contain 'additonal' applications. Puppy will boot to desktop without them. However, if present their content has priority over the content of the 'core' file-system if there is a conflict. 'Merge in RAM' works like graphic overlays: the index will point to the content having the highest priority, lower priority content is ignored.
An adrv.sfs has priority over a ydrv.sfs. Having even higher priority is the content of the SaveFile/Folder, with the ‘current content in RAM’ having the highest priority. When you install a package –pet, deb or other-- its content is dispersed in your file-system-in-RAM. When you change a setting, you’ve made that change in RAM. You operating system in RAM may not recognize that change until you Menu>Exit>Restart Graphical Server AKA ‘X’ which causes Puppy to re-catalog/index its current content. Some packages trigger a re-catalog. Those changes, however, do not become a permanent part of your operating system until a Save is executed.
That’s why bigpup was able to construct a pet that did not include the files necessary to create a menu entry. The pet, installed, has a higher priority than the original so its content would be used. But the original’s files relating to the menu entry are still present and --there being no files having higher priority-- would be used.
The pet –originally only in RAM-- was written to your SaveFile/Folder when a Save was executed. That did not remove those files located in puppy_xxx_#xx.sfs, merely re-directed the index away from them. A SaveFile/Folder is READ-WRITE. When you uninstalled the pet, the index once again pointed to the content in the copy of those files in RAM of the puppy_xxx_#xx.sfs.
White-outs come into play when you use Menu>Setup>Remove Builtins, or delete a file in RAM that the copying of a file-system on Storage placed there. Those files are still in a READ-ONLY file-system on Storage. What happens is a file bearing the ending ‘.wh’ is written in RAM adjacent to the effected file or folder. .wh tells Puppy to ignore this file or folder. Remastering copies files from RAM, but follows the instructions and doesn’t copy files/folders which are to be ignored. Amethyst’s Save2SFS tool [in viewtopic.php?p=12983#p12983] when creating an adrv.sfs or ydrv.sfs writes both the files and the white-outs. This can lead to problems which amethyst has addressed, see viewtopic.php?p=73301#p73301.
When a package is installed its contents are copied from their locations in the package to the corresponding location in RAM (later preserved by Save or Save2SFS in the SaveFile/Folder or adrv or ydrv). Those locations are not entirely random. To a large extent Puppys follows Linux’s general Rules as to where files belong. See for example, https://i.pinimg.com/originals/f1/56/6a ... 2e817b.png and the discussion at https://tecadmin.net/linux-file-system/
Short version: executables are placed in /bin or /sbin folders; libraries=dependencies are placed in /lib folders; /opt can be used for anything including entire applications with their own file-systems but is ‘not on-the-path’: the operating system will not look there unless told to do so by an executable in a bin file or the Exec=argument of a desktop file. Desktop files (which are used to generate menu entries) are almost always located at /usr/share/applications; but I’ve occasionally seen them in Puppys at /usr/local/. Generally Linux distinguishes between bin and sbin reserving the latter for executables relating to hardware. Puppy, however, is more relaxed.
If you open a /usr/share/applications...desktop file in a text editor you’ll see a line beginning with icon=. Icons/pixmaps can be placed anywhere; but you may have to provide the ‘full path’ to where. Linux generally will look in both the /usr/share/icons and /usr/share/pixmaps folder when no path is specified. But Puppys will only look in /usr/share/pixmaps. You’ll also see an Exec= argument. Again without specifying the path, both Puppys and Linux in general will look in all the /bin and /sbin folders.
These file systems also have priorities. The Top level /bin and /sbin folders –these are where the creators of a distro locate binaries-- and /lib folder (for dependencies)-- have lower priority than /usr/lib, /usr/bin and /usr/sbin. These are where under Linux in general the files installed by Users are to be located. I think the files ‘hanging from’ /usr/local have even higher priority; as does –under Puppys-- files located in /root/my-applications. Those folders there are unique to Puppys.
Things got complicated when 64-bit operating systems became possible. Slackware added /lib64 and /lib32 folders; while debian & Ubuntu added three folders bearing the name /x86_64-linux-gnu. As a result, applications that make use of /x86_64-linux-gnu have to be ‘translated’ if they are to be used in Slacko Puppys; while for some reason --perhaps relating to the instructions in initrd-- applications making use of /lib64 folders can sometimes be used OOTB in non-Slacko Puppys.
Things got even more complicated when Ubuntu and debian –but not Slackware-- adopted the ‘user-merge’ Rule. My understanding of it is that it restricts use of the top level /bin, /sbin and /lib folders to the creators of a distribution. In this situation, the Dev of a Puppy is NOT a creator since Puppy is ‘derived’ from its binary compatible distro via woof.
My explorations suggest that at least to some extent, binaries and libraries which the creator of a pet or SFS might have previously located in /bin, /sbin and /lib if placed in /root/my-applications/bin or .../lib will still result in a functional application.
Another ‘wrinkle’: Other Linuxes use a folder named ‘Home’ for each User to store his/her settings and customizations. A Puppy User runs as Root and his/her Home folder is /root. So until recently Puppys did not have or need a folder named Home. However, in order to make use of google-chrome and chromium-clones, it was found that the easiest way was to create a top-level Home folder, and limit its permissions to those granted Spot.