Linked Questions
39 questions linked to/from How to un-submodule a Git submodule?
597 votes
17 answers
288k views
How to import existing Git repository into another?
I have a Git repository in a folder called XXX, and I have second Git repository called YYY. I want to import the XXX repository into the YYY repository as a subdirectory named ZZZ and add all XXX's ...
157 votes
6 answers
93k views
When to use git subtree?
What problem does git subtree solve? When and why should I use that feature? I've read that it is used for repository separation. But why would I not just create two independent repositories instead ...
82 votes
3 answers
42k views
remove git submodule but keep files
I have a git submodule that I would like to become part of my main project (since I have a lot of project specific code that will go into the submodule). So I'd like to remove the git references to ...
78 votes
1 answer
31k views
How do I add files in Git to the path of a former submodule?
I have a project that used to contain a submodule, at path mysubmodule. I installed the latest Git from source (1.8.3-rc2) and ran git submodule deinit mysubmodule. I then deleted the .gitmodules ...
36 votes
4 answers
29k views
Git merge submodule into parent tree cleanly and preserving commit history
I have a repository with two submodules that I want to convert into a single project. Many answers involve scripts, and some seem to be overcomplicated. [submodule "site"] path = wp-content/...
20 votes
2 answers
23k views
Cannot remove submodule from Git repo [duplicate]
I have a subproject in a Git repo that I want to remove but am not able to. On the GitHub web interface the submodules are shown with black (or grey) folder icons and are not clickable. There are ...
8 votes
4 answers
9k views
Directory showing up as a grey folder on github, but not tracking its content. Why?
I have a directory "ui-kit" that shows up on github as a grey folder. It's not clickable. Here is the whole content of .gitignore: # Fleetwit docs uploads/* .env *.prj *.pui # Logs logs *.log #Node ...
12 votes
3 answers
7k views
Convert a git submodule to a regular directory and preserve the history in the main tree?
I have a project that consists of many submodules. However, some of these submodules in hindsight shouldn't be submodules, as they aren't meant or would ever be used in another project and I'm ...
8 votes
2 answers
4k views
Merging two Git repositories
I have a one git project with a file structure like this: Project_A/files... I have another git project with a file structure like this: Project_B/ Project_A/files... files......
8 votes
2 answers
5k views
Merge git submodule into main repository
Ok, we have a repository with 3 submodules. Now we want to merge this submodules back into main repository, keeping all history (well, using submodules turned out to be more headache than being ...
7 votes
2 answers
5k views
Add subproject as usual folder to repository
I noticed that in my directory there were two modules that had been Subprojects of my Git repository. That happened because I moved them all to one Git repo and those modules (directories) had their ...
3 votes
2 answers
5k views
Can I make a "deep copy" of a git repository with submodules?
It is easy to clone an entire project plus all its submodules: git clone --recursive [email protected]:homer/powerplant.git However, how do I create a clone that has all these submodules replaced by ...
2 votes
3 answers
6k views
How to resolve git not pushing all files
Hello I am new to using git and actually putting code there, so yesterday I had made a new repo https://github.com/Ntshembo-Hlongwane1/After-Dark-XI-Online-Store That repo has client folder in it. So ...
0 votes
4 answers
5k views
Git add and commit is not adding files
I apologize if this is a newbie question, but I've been search around and I'm dumbfounded as to why this is. I have some files I'd like to add and commit. I run: git add . I also tried git add -...