Xcode source control unknown green file. How to remove?

In a small project under Xcode source control, there is an unknown file (BlePeripheral.swift) which I can't find or delete. I did add it at one stage, but I thought I had deleted all references to it. I have done Clean Build Folder, closed the project, and closed Xcode in the hope of resolving.

This is the source control panel showing the unwanted file in green. Right clicking on it does not have an option to Delete.

This is the main Navigation panel which doesn't show it (so no option to delete it). It was in the Model folder.

This is the search panel hoping to find it referenced somewhere

and this is the Finder view of the project folder. Its not in the Assets.xcassets or Preview Content folders.

If you do a commit, is that deleted file then committed as deleted from git?

When you've added a file, it will stay in the state it was in the last time you added it until you 'add' it again or 'restore' (inverse of adding). 'Add' is a little confusing as a term to use, though by 'adding' a file, you are really selecting which change(s) will be included in the next commit. On the command line, you can type git add <files, separated by spaces> in order to update the changes that you want to commit (or not want to commit). You can also accomplish this by removing the changes that you've 'added' by typing git restore --staged <files, separated by spaces>. Note that that second command will remove any and all changes that have been added (which sounds like what you would want in your situation). If the latest commit state matches the current working copy state, the change should not be mentioned anymore. Alternatively, in Xcode 15 (beta), you can also right click on the file and select "unstage changes" and it should clear it there too. Hope this helps.

Xcode source control unknown green file. How to remove?
 
 
Q