Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

First, my question is different from Create a submodule repository from a folder and keep its git commit historyCreate 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.

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.

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.

added 10 characters in body
Source Link
CodeWizard
  • 145.6k
  • 22
  • 162
  • 181

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
I want to move a folder ~/Folder1 into it. (~/GITA/Folder1). 
Then in the folder (~/GITA/Folder1), change it into submodule. And
And then push it (submodule ~/GITA/Folder1) to the new created server repository.

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.

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.

Source Link
yuxuan
  • 417
  • 6
  • 17

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.