Search code examples
gitrepositorygit-subtreepackagistsubtree

Sync tags in slave repos using git subtree


I have a repository on github that is made up by different modules. I prefer to have all these modules under the same repository (it's easier to work, for me), however I also need to be able to mantain a "separate copy" of these modules, because I need to submit them separately on packagist.

After a bit of research on git subtree I found this tool splitsh-lite, that was able to solve my problem.

Anyway, versioning on packagist is achieved with tags. What I would like to do is "pushing" the tag along with the commit when issuing a command like git subtree push -P lib/ lib_remote master. Is this possible?


Solution

  • If anyone is interested, I wrote a simple shell script to do this.

    You can find a more complex script here