Skip to main content
2 of 3
added 10 characters in body
CodeWizard
  • 145.6k
  • 22
  • 162
  • 181

Add folder into existed git folder and make it become submodule

First, my question is different from Create a submodule repository from a folder and keep its git commit history .

Suppose I have git folder, let's say ~/GITA.
I want to move a folder ~/Folder1 into it. (~/GITA/Folder1).
Then in the folder (~/GITA/Folder1), change it into submodule.
And then push it (submodule ~/GITA/Folder1) to the new created server repository.

yuxuan
  • 417
  • 6
  • 17