I want to prepend 10 commits of old_repo to the beginning of new_repo such that the resultant repo has 30 commits in the same order in which they were originally created.
Git commits are a graph meaning there's multiple ways to interpret the order of commits. By date. Or "topological". Preserving the order in which they were created means date order, but it's really not that important in Git.
You have two options: merge them or rebase them. Which you choose depends on what outcome you want.
In either case, make old_repo a remote of new_repo so the repositories can see each other.
git remote add old_repo <path or url to old_repo> git fetch old_repo
Merge
Merge old_repo/master into the new_repo's master.
git checkout master git merge --allow-unrelated-histories old_repo/master
Resolve conflicts as normal. And you're done. The history of both repos is now merged like so. And as you can see "date order" doesn't really matter. The original two branches preserved in the history.
O1 ... O8 - O9 - O10 \ M [master] / N1 ... N18 - N19 - N20
Rebase
This is like cherry picking each commit of new_repo on top of old_repo, but Git can do this for you.
git checkout master git rebase old_repo/master
This will replay all the commits on new_repo's master branch on top of old_repo's master branch. You'll wind up with one branch of 30 commits. No evidence that they were ever two different repositories remains.
O1 ... O9 - O10 - N1 - N2 ... N20 [master]
In either case it's safe to delete the remote to the old repo.
git remote rm old_repo