0

I cloned a symfony project, not with git, just copy. Then I create cache and log directions,and the project works. But git status shows the log and cache direction modified. I add them to the .gitignore file, It does not work.

I have tried:

git -rm -r --cached .,

git add .,

git commit -m 'xxxxx'.

But they are still there.

Any body who can help me?

Bleeding Fingers
  • 6,594
  • 7
  • 44
  • 72
Tony_Wang
  • 133
  • 1
  • 1
  • 9
  • Can you add the output of the commands you list to your question? – RazerM Aug 14 '13 at 13:13
  • 3
    If the files were previously committed, you can't ignore them using `.gitignore`: http://stackoverflow.com/a/11366713/215168 – Abe Voelker Aug 14 '13 at 13:38
  • I think it is ```git rm -r --cached``` and not ```git -rm -r --cached```. Also you need to push it after commit, so that the gitignore can ignore them. But I do hope you were not in your root repertory when you ```git rm``` everything, because I think it would just erase all your git history.... – sinhix Aug 19 '13 at 08:26

0 Answers0