Split git repo code as submodule

How to move a directory as a git submodule

Create a git repo using the directory content.

Delete the directory content from the original repo (if existing in current git repo being used)

Now add this newly created repo as a submodule.

git submodule add <git-repo-link>


git submodule add https://github.com/jsbisht/project-data.git