The branch of another repository can be placed under a subdirectory with their history. Like:
git subtree add --prefix=rails git://github.com/rails/rails.git master
Here this will appear as a single commit, however, the commit's title contains a reference to the old history tree:
Add 'rails/' from commit <rev>
Where <rev> is a SHA-1 commit hash. You can still see the history, blame some of the changes
git log <rev>
git blame <rev> -- README.md
And then it's like a usual file move commit, need a jump when reaching it.
# finishes with all files added at once commit
git log rails/README.md
# then continue from original tree
git log <rev> -- README.md
For more information on Git, you can join git training.