I’m starting work on an old codebase, which is on a production server. I need to make a local duplicate, so I think the sensible thing to do is the following:
cd docroot
git init
git add .
git commit -m "Files before I started work"
git push origin // github account
and then clone the repo to my dev box. However, some of the subfolders on the production server are separate git repos for various plugins that have been developed. Will this make a mess of the main repo I’m creating? I’d ideally like to have them as submodules, but how do I sort out the init process without disturbing the production files?
Before adding “everything”, you could create a
.gitignorefile in order to reference the path of the sub-directories which are actually git repos.They won’t be added.
That way: