I had a git repository of 4 Assignments that I had to do for a class. I then wanted to move all those assignments into one repository to make room for more private repositories on my git (We are only allowed so many). When I tried to do it by just moving the files into the new directory and using git add. This instead made submodules and that isn't what i want. How can add these folders of code as a subdirectory and not a submodule?
Asked
Active
Viewed 337 times
1
-
Did you maybe copy the files over along with the hidden `.git` folder? This might be the issue... A folder containing a `.git` folder is considered a repository in itself... – Lix Nov 23 '15 at 15:39
-
The problem was that the .git was hidden so I couldn't find it. Thank you! – CSinginGeek Nov 30 '15 at 20:38
-
Glad to hear you found the issue! Having a dot at the beginning of a file or folder is by convention a hidden item. – Lix Nov 30 '15 at 20:39
1 Answers
0
If you just want the files without the development history, you can simply copy each of the original repositories to the new one, deleting the .git
folder in the copy-and-pasted repositories.
If you want to preserve the development history, follow the instructions in this post.