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 8388981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:35:50+00:00 2026-06-09T18:35:50+00:00

I have a structure like so SDI |-.gitignore \-webapp In the SDI/webapp/app directory, when

  • 0

I have a structure like so

SDI
|-.gitignore
\-webapp

In the SDI/webapp/app directory, when I run git rm -r --cached ., I see files like this removed

rm 'webapp/app/views/MyStuff/myGroups.html'
rm 'webapp/app/views/MyStuff/userAdd.html'
rm 'webapp/app/views/MyStuff/userEdit.html'
rm 'webapp/app/views/auth/Secure/login.html'
rm 'webapp/app/views/errors/404.html'
rm 'webapp/app/views/errors/500.html'
rm 'webapp/app/views/main.html'
rm 'webapp/app/views/tags/auth/check.tag'
rm 'webapp/app/views/tags/generic.html'
rm 'webapp/app/views/tags/text.html'

My .gitignore contents are as follows

eclipse/
tmp/
bin/
tools/play-1.2.5/framework/pym/

Why is it removing ALL my files? I do have git config file.mode false as the only thing unique on this repository compared to other ones I have done in the past.

  • 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-06-09T18:35:52+00:00Added an answer on June 9, 2026 at 6:35 pm
    • In does not actually remove the files, it only remove the changes from the index. Your working space remains untouched.
    • It does this, because you tell it to do so.

    http://www.kernel.org/pub/software/scm/git/docs/git-rm.html

    Remove files from the index, or from the working tree and the index. git rm will not remove a file from just your working directory. (There is no option to remove a file only from the working tree and yet keep it in the index; use /bin/rm if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the -f option. When –cached is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index.

    and

    -r
    Allow recursive removal when a leading directory name is given.

    and

    –cached
    Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.

    I don’t know, what you want to achieve (because you didn’t tell), but the command does exactly, what it should and in the way it should.

    .gitignore “just” tells git to not add changes to the index, when calling git add recursively (e.g. git add ., or git commit -a), or show them in git status (and probably other tools, but thats the most common use cases). Because changes to this files shouldn’t be staged anyway, git rm doesn’t affect them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

let's say that I have structure like this : As most you may see
I have directory structure like this src main resources text.txt scala hello world.scala test
I have structure like this. <ul class=gallerylist> <li> <image ...> <input ...> </li> <li>
I have a structure like this struct structure { BaseObject &A; //BaseObject has a
I have a structure like this: var var1 = { array1 : ['value1','value2', ...],
I have a structure like this.... UITableViewController -> UITableViewCell -> UIView I need the
I have xml structure like this: <Group id=2 name=Third parentid=0 /> <Group id=6 name=Five
I have directory structure like so: |-- ROOT |-- Project1 | |-- application |
My table have data structure like this cate_id task_id date_start date_end other 34 14
I have structure like this below. Now, I want swap 2 structures. public struct

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.