Certain files don't show as modified, or push to GitHub

I recently added 4 SwiftUI view files to my project. When I look in the Navigator, they do not have the letter A next to them, and modifying them does not show an M. When I try to commit them to Git or push them to GitHub, they do not show up in the list. I have checked GitHub, and they do not exist there, so were not pushed in a previous commit. I have checked that each of them has my project checked in Target Membership. Also, when I build my project these views show up in the hierarchy of views, and function as intended. So clearly Xcode knows they are part of the app, but for some reason isn’t including them in the Git repository.

If I go to Source Control and choose New Git repository, I’m told that all files are already under source control. Does anyone know how to get these included?

Well, it must have been an Xcode glitch. After trying numerous times without success, I rebooted my Mac, and all seems to work once again. The files still didn’t show an A next to them, despite never having been previously committed, but new modifications do show the M now, and then allow me to commit them and push to GitHub.

In the menu with git too, (I can’t remember what it’s called right now) but there’s an option for Refresh File Status because basically sometimes Xcode gets confused