IF the folder option is not possible (one folder per repo), then you would need to define two repositories with the same worktree (same folder with all your files)
cd /path/to/common/folder
git --git-dir=../repo1.git init .
git --git-dir=../repo2.git init .
Then for each repo, you define your exclusion, to ignore the files of repo2 for repo1, and ignore repo1 files for repo2.
echo 'pattern1' > ../repo1.git/info/exclude
echo 'pattern2' > ../repo2.git/info/exclude
This is only possible if each set of file is easily referenced by one or a few patterns.
If you have to list each and every files you want to ignore, that won't scale well.
Finally, you need to define aliases:
alias git1='git --git-dir=/path/to/repo1.git'
alias git2='git --git-dir=/path/to/repo2.git'
Start by defining two different remote repositories:
cd /path/to/common/folder
git1 remote add origin https://github.com/<me>/repo1
git2 remote add origin https://github.com/<me>/repo2
And you can start adding, committing and pushing from the same folder.