Martin Weber
Martin Weber

Reputation: 4032

Combine single and multiple project repositories using git?

In a larger project that consists of several smaller applications I need to see the changes of the smaller applications on one screen. I searched a while but all I found out is that there is a general discussion on using one large repository against using several small repositories.

What would be the easiest way to use one repository for each smaller application and a larger repository for the complete project combined?

So that the developer only commits to the smaller repos, but someone else would be able to follow all changes of a larger repo without the need of additional commiting.

Upvotes: 0

Views: 42

Answers (1)

zigarn
zigarn

Reputation: 11625

Create an empty repository, add all small repositories as different remotes, fetch them and you will be able to see a sort-of combined history:

git init one-repo-to-watch-them-all
cd one-repo-to-watch-them-all
git remote add repo1 URL_TO_REPO1
git remote add repo2 URL_TO_REPO2
git remote add repo3 URL_TO_REPO3
...
# Then, every time you want to see the whole history:
git fetch --all
git log --all --graph --decorate --oneline

Upvotes: 1

Related Questions