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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.