I have a main_project
which contain project1
,project2
,project3
. I want to add project4
files into, I've run these commands, it creates the folder but as an empty folder :
git pull
# add the project4
git add .
git commit -m "test"
git push
I have a main_project
which contain project1
,project2
,project3
. I want to add project4
files into, I've run these commands, it creates the folder but as an empty folder :
git pull
# add the project4
git add .
git commit -m "test"
git push
If the project4 itself has a .git
subfolder, that would means:
git add .
from the parent project would only record a gitlink (special entry in the index), not the actual folder content.If you don't need project4
folder history, simply remove the .git
subfolder.
If you do need, consider referencing project4
through submodules.