Reputation: 6695
Just pulled a branch which another developer was working on it. I haven't changed anything at all. Just pulled and run git status and git shows that ../.eslintcache is untracked and is suggesting to include it in what will be committed.
What should I do? I don't think that I should add and commit it.
Upvotes: 9
Views: 4314
Reputation: 1707
It's a leftover of you previous work.
Either you made linting, ot is is a part of some other job/script. In .eslintcache some linters caching occurs, and during this process it was created.
When you checking out new branch all untracked files will be still reside in you directory, unless there will be some conflicts.
You should add generated files (like .eslintcache) which you don't want to appear in git status
, to be omited by git to .gitignore.
Upvotes: 4
Reputation: 837
Add folders and files you don't want to have in your repo to .gitignore
Here is more info about that file: https://git-scm.com/docs/gitignore
For instance files generated by IDEs and tools used while development are usually added there. Like .eslintcache folder added by eslint. This might happen because you added this folder to your IDE, which probably runs linting and other check ups running in the background.
In your case .gitignore might look like:
.eslintcache
#JetBrains IDE
.idea/
Upvotes: 9