When committing after modifying the file, you need to check Show whole project. After selecting it once, it will be automatically selected for each subsequent submission. If it is not selected, the modified file cannot be submitted. I don’t know why, please note it here.
In addition, it seems that it is impossible to submit empty directories in git, and there must be files under the directory.