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.
http://www.kernel.org/pub/software/scm/git/docs/git-rm.html
and
and
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 callinggit addrecursively (e.g.git add ., orgit commit -a), or show them ingit status(and probably other tools, but thats the most common use cases). Because changes to this files shouldn’t be staged anyway,git rmdoesn’t affect them.