If you’re using Git from the command line, is there a way to delete in one fell swoop all the files to be deleted in the Changed but not updated list? Rather than doing manual removes using wildcards.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Files shown as deleted in the “Changed but not updated” section of status are deleted from the work tree but not from the index. To stage the deletion in the index (i.e. remove the file from the index) you can do:
--diff-filter=Dshows only the differences to the index that are deleted files,--name-onlyjust prints their name and-zuses NUL to separate file names so that you don’t have to worry about filenames with embedded newlines.update-indexthen removes the given files from the index.If you have a version of
xargsthat supports-0then you could do the slightly simpler: