Reputation: 165
I have a single git repository containing multiple projects. I have pulled these projects from different git repos using the method described here:
Example Repo Structure:
ProjectOne
Now, the original git repo of ProjectA is constantly under development and I need to periodically pull in latest changes to my ProjectOne repo. I want to keep the commit history of ProjectA when pulling in changes. Does anyone here has any idea how to do it ?
Upvotes: 1
Views: 859
Reputation: 1327184
Another approach would be to add ProjectA
as a submodule of ProjectOne
cd ProjecTOne
git submodule add ProjectA /url/of/ProjectA
That way, a simple git submodule update --remote
would be enough to update its content with the latest of ProjectA
, and preserving its history.
Upvotes: 1