Creating a branch branch for multiple git branches

I would like to stack other branches on top of an existing branch, and these branches will be reviewed independently. This would be useful, for example, to allow combining binaries for different subprojects into the same directory bin. In general, this file will be present in only one layer.

Ideally, I suppose I would use unionfs to achieve this, but it must somehow provide access to the various .git directories that will appear in all subdirectories of the same root. Anyway, I think unionfs is not really working? Therefore, it is best to simply maintain a set of symbolic links from the root of the repo to other repositories containing layers.

I am considering doing something like this:

  • save each "layer" in a separate repository
  • maintain symbolic links in the master repo to each file, which should be layered
  • Add symbolic links to the .gitignore wizard so that they are not deleted when switching branches.
  • completely incompatible with Windows so that you can edit files at their location in the root repository. IE uses symbolic links instead of just copying files to the master repo.

It would be prudent to keep track of the source commit ID for each level, so that, for example, files deleted from a layer in a subsequent revision can remove their symbolic links from the source repo and be deleted from the main repo .gitignore file.

, git submodule, , .

, ? stg (stacked git) , , , .

+3
4

, , , , , GIT post-commit/post-update .

, , , , , .

+3

git , , , -, dir, ...

http://progit.org/book/ch6-7.html

, ,

+1

,

.

: , (, <project>/bin).

, , - , : " ?".
, , .
I.e: , .

0

. https://github.com/lesfurets/git-octopus.

glob ( ). :.

git octopus features/*
0

Source: https://habr.com/ru/post/1747403/


All Articles