I am in the process of merging multiple git repositories, and mostly happy with the result except a few quirks.
I merged three repositories into one by first using git filter-repo
to move individual git repos into subdirectories. I then performed a git pull with merge ort strategy (with --allow-unrelated-histories
flag) from those local folders.
Now my new "merged" git repo has the three subdirectories. But the commits for the individual repos are not visible from the root level without the --follow
flag, or explicitly cd
into the directory and then looking for the commit.
For example, git show <commit-sha>
, where commit-sha
came from subdirectory foo
for example is only visible inside that subdirectory OR by using --follow
flag with git log.
I'm happy with the fact that I still have the history for each of these subdirectories, but I it would make life much simpler if I could probe the repository history without special flags or entering particular directories. I must note that I don't particularly care about maintaining the same SHAs as the old repos, but interested in the histories. How do I make that happen?