Having both local and remote git repositories at the same time with different files included

I need a local repository for tracking my changes and a remote repository containing just some of these files.

I added a parent directory to the project to initialize a local repository and initialized another git in the project dir as another remote repository and published it to GitHub.

.gitignore file of parent repo is empty but .gitignore in child excludes all fies except some specific ones.  Parent repository should not use .gitignore file of the child repo.

I need local repository to track all files and a remote repository to track just some of them. The problem is that parent repository does not include anything inside the project.

I tried this submodule solution but it creates a new folder for new repository instead of using existing one.

It sounds like what you want is really just two separate Git repositories that you occasionally copy files from one to the other :grinning:

Maybe if you can give some more specifics of what it is ultimately you’re trying to get done rather than how you’re wanting to do it, we can figure out an easier way for it to happen?