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

18 views
Skip to first unread message

Bizt

unread,
Jan 31, 2014, 9:56:51 AM1/31/14
to rubyonra...@googlegroups.com
Hi,

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.

Cheers
Bizt

Colin Law

unread,
Jan 31, 2014, 10:35:19 AM1/31/14
to rubyonra...@googlegroups.com
Use git gui (unless you don't have a graphic UI). Then it is easy.

Colin

Melvin Ram

unread,
Jan 31, 2014, 11:31:38 AM1/31/14
to rubyonra...@googlegroups.com
Use 'git add -u' or add the specific files you've removed ex. 'git add app/removed_file.rb'

Bizt

unread,
Jan 31, 2014, 7:06:30 PM1/31/14
to rubyonra...@googlegroups.com
Thanks for your reply. Can you tell me what "git add -u" does, I can't find documentation for that specific option. Thanks

Colin Law

unread,
Feb 1, 2014, 4:31:21 AM2/1/14
to rubyonra...@googlegroups.com
On 1 February 2014 00:06, Bizt <marty...@gmail.com> wrote:
> Thanks for your reply. Can you tell me what "git add -u" does, I can't find
> documentation for that specific option. Thanks

https://www.kernel.org/pub/software/scm/git/docs/git-add.html

Bizt

unread,
Feb 1, 2014, 8:18:06 PM2/1/14
to rubyonra...@googlegroups.com
Thank you. Sorry I didn't see -u there before, I see it now. Great
Reply all
Reply to author
Forward
0 new messages