0

I'm using Windows 10. Below is my folder structure.

Test
    -> Test2 -> Test3
    -> .gitignore

.gitignore

Test2/Test3 

Would like to igone Test3 locally. It has modified files. So it's till showing. It's already there in .gitignore.

Still it's showing on git status

Jackson
  • 1,426
  • 3
  • 27
  • 60
  • If you want to ignore only locally, use `.git/info/exclude` instead of `.gitignore`: http://stackoverflow.com/questions/1753070/git-ignore-files-only-locally – rom1v Jan 24 '17 at 09:31
  • In exclude folder what needs to put?. Not able to create `.git` directory it says Invalid file type – Jackson Jan 24 '17 at 09:45
  • 2
    You can't ignore modified files. You can only ignore files that aren't in the repository already, which is to say that a `.gitignore` or a `.git/info/exclude` can only affect files in the `added` state, never in the `modified` state. – Edward Thomson Jan 24 '17 at 10:03

2 Answers2

0

You have to remove git cache by

git rm --cached -r .

And then add files again will work fine

git add .
DilumN
  • 2,889
  • 6
  • 30
  • 44
-1

Local files that you want git to ignore can be set in .git/info/exclude (similar to .gitignore).

centralcmd
  • 20,234
  • 2
  • 10
  • 7