Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 567233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:03:41+00:00 2026-05-13T13:03:41+00:00

I have a load of deleted files I want to commit. But I don’t

  • 0

I have a load of deleted files I want to commit.

But I don’t want to type git rm for each one.

If i type git rm . -r it will try and delete everything.

What do I type to commit all these deletes in one go?

See git status below
Changed but not updated:
(use “git add/rm …” to update what will be committed)
(use “git checkout — …” to discard changes in working directory)

   deleted:    ProjectX/ProjectX/Content/Site.css
   deleted:    ProjectX/ProjectX/Controllers/HomeController.cs
   deleted:    ProjectX/ProjectX/Global.asax
   deleted:    ProjectX/ProjectX/Global.asax.cs
   deleted:    ProjectX/ProjectX/Models/HomeIndexView.cs
   deleted:    ProjectX/ProjectX/ProjectX.csproj
   deleted:    ProjectX/ProjectX/Properties/AssemblyInfo.cs
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftAjax.debug.js
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftAjax.js
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftMvcAjax.debug.js
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftMvcAjax.js
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftMvcValidation.debug.js
   deleted:    ProjectX/ProjectX/Scripts/MicrosoftMvcValidation.js
   deleted:    ProjectX/ProjectX/Scripts/jquery-1.3.2-vsdoc.js
   deleted:    ProjectX/ProjectX/Scripts/jquery-1.3.2.js
   deleted:    ProjectX/ProjectX/Scripts/jquery-1.3.2.min-vsdoc.js
   deleted:    ProjectX/ProjectX/Scripts/jquery-1.3.2.min.js
   deleted:    ProjectX/ProjectX/Scripts/jquery.validate-vsdoc.js
   deleted:    ProjectX/ProjectX/Scripts/jquery.validate.js
   deleted:    ProjectX/ProjectX/Scripts/jquery.validate.min-vsdoc.js
   deleted:    ProjectX/ProjectX/Scripts/jquery.validate.min.js
   deleted:    ProjectX/ProjectX/Views/Home/Index.aspx
   deleted:    ProjectX/ProjectX/Views/Shared/Error.aspx
   deleted:    ProjectX/ProjectX/Views/Shared/Site.Master
   deleted:    ProjectX/ProjectX/Views/Web.config
   deleted:    ProjectX/ProjectX/Web.config
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:03:42+00:00Added an answer on May 13, 2026 at 1:03 pm
    git add -u
    

    Will stage all changes including deletions. This is usually the simplest way forward. You can restrict it to certain paths if this is more suitable.

    e.g.

    git add -u ProjectX
    

    After doing either you can use the path form of reset to ‘unstage’ any changes that you didn’t want.

    git reset -- dontcommitme.txt
    

    To be absolutely sure that you are only staging deletions, you would have to do something like this:

    git diff --name-only --diff-filter=D | xargs git rm --
    

    Or if you have access to a GNU xargs and need to copy with whitespace in filenames:

    git diff -z --name-only --diff-filter=D | xargs -0 git rm --
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of CSV files I want to load into my database,
I have jQuery load asset on my layout and I want to use CHtml::ajaxButton/ajaxSubmitButton
I have to load an array of doubles from a file, multiply each element
Question We have a large number of xml configuration files that we want merged
I have multiple VB6 .frm files. See example below. I want to strip away
I have an arbitrary number of files that I need to load in an
We have a load test that runs of 100 concurrent users. We also have
I have a load once jqgrid that uses a custom formatter to display checkboxes
I have to load a kmz file in to the android application that i
I have to load huge (3000x3000) pictures in SWFLoader, and no problems with that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.