Let's say I have a repository with a folder hierarchy like this one:
repo1
    +- project1
    +- project2
    +- project3
    +- project4
    +- project5
    +- ...
There is another repository repo2 which should contain only a subset of projects/folders from the repo1:
repo2
    +- project1
    +- project2
    +- project4
I am looking for the most efficient/simple/reliable (pick any two) way to occasionally synchronize repo1 and repo2.
Conditions:
- I specifically do not want to add - repo1as a remote repo for- repo2. Parts of- repo1that are not supposed to be synchronized should not be accessible.
- The - repo2repository is essentially a snapshot repository. It will only be updated to include the recent changes from- repo1. There will never be any direct, manual commits made to it.
- Synchronization does not need to happen on every commit in - repo1. In fact, the synchronization should only be triggered either explicitly or on some- repo1event that occurs less frequently (such as tagging).
- It is not necessary to synchronize all individual commits made in - repo1since last synchronization. When synchronizing, it will be enough to just take the current versions of relevant- repo1projects and push them to- repo2.
I guess I'm looking for a less cumbersome version of this approach (ideally not having to do anything locally):
- checkout repo1locally
- checkout repo2locally
- copy relevant projects/folders from repo1working directory torepo2working directory
- commit changes in repo2
- push local repo2commits to its origin
Any ideas/suggestions?
