git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Ewa ŚliwińskaNext: Ewa Śliwińska
Message 2 of 17 in “file is showing as modified even that it was never commited”
  1. Ewa ŚliwińskaMay 3, 2020
  2. Shourya ShuklaMay 4, 2020
  3. Ewa ŚliwińskaMay 4, 2020
  4. Shourya ShuklaMay 4, 2020
  5. Ewa ŚliwińskaMay 4, 2020
  6. Sergey OrganovMay 4, 2020
  7. Ewa ŚliwińskaMay 4, 2020
  8. Sergey OrganovMay 4, 2020
  9. Ewa ŚliwińskaMay 4, 2020
  10. Andreas SchwabMay 4, 2020
  11. Ewa ŚliwińskaMay 5, 2020
  12. Andreas SchwabMay 5, 2020
  13. Ewa ŚliwińskaMay 5, 2020
  14. Andreas SchwabMay 5, 2020
  15. Ewa ŚliwińskaMay 5, 2020
  16. Andreas SchwabMay 5, 2020
  17. Ewa ŚliwińskaMay 5, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.