I have two git repositories in one folder. I am able to relocate the
The synopsis of the documentation for gitignore mentions several locations:
$HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore
The first is a global user-dependent ignore file, the second is what you're looking for, and the third is what you are complaining about. If I understand you correctly.
So yes, you can relocate the content of the
.gitignore file to
$GIT_DIR/info/exclude. It's not total freedom, but it does move the file out of the root of the repository.