I have ruby console application which is using grit gem to manipulate git repositories on MacOS.
When call that application from git folder I want to edit, and edit some files, that files will appear in modified as well as in added files in git status. And when want to commit and push those files I get this error:
git '--git-dir=/Users/user/some_dir/.git' '--work-tree=/Users/user/some_dir' add '--' 'edited_file.yaml' 2>&1:fatal: pathspec 'edited_file.yaml' did not match any files
Is there some known reason why this is happening, and also what would be the best way to avoid this?
I'm able to edit the code of this ruby console application, so looking for suggestions how to handle cases like this from application if they can't be handled on git level.