On Creating Gems

If you intend to create a new repository for a gem that will only be used in one project, consider creating this gem into the vendor/gem directory in the parent project.

This will make shipping stuff easier. Now you don’t need to make the commit in the gem git repo, then change the Gemfile in the parent project, then bundle install, then commiting the Gemfile.lock in the parent repo.

Afterwards, if you really need it, you can split the entire git history of the gem by using git subtree push:

git subtree push --prefix vendor/gem git@example.com/upstream-gem.git master