Run "generator destroy", now git is telling me I have missing files. How do I best deal with this?


In rails I run “rails generator destroy…” for my controllers and models. When I "git add . " files and commit changes, git tells me I have missing files. How best to handle this? I want the files off git as I don’t need them anymore, they’re not in my local repository. Do I then need to manually “git rm …” for each one. Is there is quick way to just remove these files from git? Usually destroy command deletes many files.


Use git gui (unless you don't have a graphic UI). Then it is easy.


Use ‘git add -u’ or add the specific files you’ve removed ex. ‘git add app/removed_file.rb’

Thanks for your reply. Can you tell me what “git add -u” does, I can’t find documentation for that specific option. Thanks

Thank you. Sorry I didn’t see -u there before, I see it now. Great