I accidentally trashed the folder containing all my swift and storyboard files. I moved the folder back to its original position and everything's fine (all files have ?, M, or A next to it), except launchScreen.storyboard has a D (meaning ready for deletion) next to it.
I closed and reopened Xcode and I still see the D next to launchScreen.storyboard. The Full file path in its identity inspector looks correct to me. Is this just an Xcode 8 glitch? If I push my project to git, will the file be deleted?
The D means that the file is marked for deletion in your repository (Git, by default.)
(The instructions below assume you're using Git as your source control system, which is the default. If you're using SVN instead, let us know.)
Open a terminal window. Type "cd " (with a space) and then drag your top-level project folder (the one that contains the project file) into the terminal window. That should create a change directory command that's formatted correctly even if some of your directories contain spaces.
Press enter. The terminal should now be pointing to your project directory.
Type "git status" and hit enter.
It will probably show your file "launchScreen.storyboard" as deleted.
If so, type git add <path_to_file>
where you replace <path_to_file>
with a partial path to the file in question (which may be in a subdirectory of your project folder.)
Once you've done that, commit your project and the file should be back in your repository.
As @Scriptable said in their answer, you could also type git add .
, but that would add EVERY untracked file in your project folder to your git repository that's not excluded by your .gitignore file, which you may not want to do.