How to add multiple projects into a Single repository in Bitbucket?
I am trying to add multiple projects into a single repository in Bitbucket, but after commiting when I pushed to the origin master it just added the empty folders. No subfolders and files have been added. I have followed below steps,
- From the main folder,
git remote add origin gitrepositoryname
git add --all
git commit -m "initial commit"
git push -u origin master
One Solution collect form web for “How to add multiple projects into a Single repository in Bitbucket?”
That would happen if those project folders are themselves nested git repos.
In that case, the content of those nested repos would be ignored: see “How to commit a git repo into a git repo (not submodule)”.
You could try and “merge nested git repo into parent repo, retaining history”.
Or you could declare those nested repo as submodule.
(as in “Creating Git Submodules out of existing repository and reflecting parent changes to the child repository”)