How to create git submodule from repository subdirectory

This tutorial explains how to extract a subdirectory of a git repository and how to make it a submodule or an independent git repository in 8 easy steps.

Problem

If you work with

4 Comments

  1. Edward Ortega

    Great help, thx!

    Reply
  2. plambe

    Does this method preserve the combined history of Project + Library 1 as it used to be in Project? If I go to commit #10 in the Project+Library 1, will it revert to the same files as in the case of commit #10 for the original Project repo?

    Reply
  3. Shyamkumar L Chauhan

    What is REMOTE_URL in this case ?

    Reply
    1. Davide Coppola (Post author)

      The IP or url of the remote server hosting the repository of Library1

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *