Re: file is showing as modified even that it was never commited
- From
Shourya Shukla <shouryashukla.oo@gmail.com>
- Date
- May 4, 2020, 05:55 UTC
- Message-ID
- <20200504055530.GA13290@konoha>
- In-Reply-To
- <CAEoQP9iY-0+=ETA0vrHL0HngccwtNA_3KX4WSSokJpOgJDGUeA@mail.gmail.com>
Hey Ewa!
This might be the fix for you:
A `gitignore` file ensures that certain file(s) which are not tracked by Git remain untracked. However, sometimes particular file(s) may have been tracked before adding them into the `.gitignore`, hence they still remain tracked. To untrack and ignore files/patterns, use `git rm --cached <file/pattern>` and add a pattern to `.gitignore` that matches the <file>.
Most probably the '.idea' folder might have been tracked before adding it to the '.gitignore' and hence it shows up in the staging area (i.e., when you run a `git status`, it shows up as modified).
If there is a doubt still, feel free to drop a message here :)
Regards, Shourya Shukla