Is there a better solution for removing manually-removed files from the Git repository than my current error-prone command ?
git status | grep deleted: | cut -d: -f2 | xargs git rm
I think you are asking to delete files from the index that were deleted from the working tree. The command
To do more exactly what you requested, the
Hi i will point you to my script etckeeper-ng were i solved the same problem
I will describe shortly how you could do it better:
First create a helper file which can be parsed.
The git_status_file variable is in this case set to */tmp/git_status_file* The next i do is i use the $git_status_file as an input in a while loop:
This actually does work with my etckeeper-ng module where i solved the problem this way. hope that this helped.