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
Ewa Śliwińska <kreska07@gmail.com>
Date
May 4, 2020, 20:04 UTC
Message-ID
<CAEoQP9ic7yU01JWkjiNT40gtq0WyUW7sBAJPRRdBRw93dhRw9w@mail.gmail.com>
In-Reply-To
<87o8r3cwcn.fsf@osv.gnss.ru>

I don't know why would something be broken in my repo. As I wrote, I simply clone it (empty) from bitbucket and than started adding code, really nothing extraordinary.

"Is it the .gitignore that tells git to ignore all files in .idea/?" - no, it contains some default-ignored by idea files. The one that I'm using (or at least intended to) is on the main level.

This is the output of the commands you wrote me to run:
mac:.idea noelo$ git log -- .idea/sonarlint/issuestore/index.pb
mac:.idea noelo$ git check-ignore .idea/sonarlint/issuestore/index.pb
.idea/sonarlint/issuestore/index.pb
mac:.idea noelo$

So it still seems like the file was not committed and it is ignored as far as I understand this.

On Mon, 4 May 2020 at 21:51, Sergey Organov <sorganov@gmail.com> wrote:
Show 78 quoted lines
>
> Ewa Śliwińska <kreska07@gmail.com> writes:
>
> > Hi Sergey,
> >
> > Thanks for engaging here.
> >
> > Actually, I gave some details in the first email, I'm not sure if they
> > were even noticed.
> >
> > About asking second time: I emphasized this because I felt this part
> > was ignored and I didn't like it.
> >
> > I wanted to describe problem more generally and gave you the commands.
> > But now I will paste the console full output as you demanded:
> >
> > mac:lp3rater noelo$ git status
> >
> > On branch master
> >
> > Your branch is based on 'origin/master', but the upstream is gone.
> >
> >   (use "git branch --unset-upstream" to fixup)
>
> This is something I've never seen before. Dunno how this happened to
> you, but to me it rings a bell that something weird goes on in this
> repo. Maybe it's in fact nothing, but then you may get all kinds of
> nasty behaviors if repo is indeed broken.
>
> >
> >
> > Changes to be committed:
> >
> >   (use "git reset HEAD <file>..." to unstage)
> >
> >
> > new file:   .idea/.gitignore
> [... a lot more new files ...]
>
> Interesting. Is it the .gitignore that tells git to ignore all files in
> .idea/? If so, it's not a good idea for .gitignore to ignore itself.
> It's very confusing at minimum.
>
> Many new files also tells that you somehow, apparently by mistake, added
> all these files to staging (that will be committed at the next commit).
>
> Also, apparently you already did this same thing before, so there are
> some more files from .idea/ that are already there.
>
> [...]
>
> > Changes not staged for commit:
> >
> >   (use "git add <file>..." to update what will be committed)
> >
> >   (use "git checkout -- <file>..." to discard changes in working directory)
> >
> >
> > modified:   .idea/sonarlint/issuestore/c/0/c02b58f69e810278d2d423bdee557628145ed943
> > modified:   .idea/sonarlint/issuestore/f/b/fb31951790c271e26d568f9ac5b7681e7f0804ec
> > modified:   .idea/sonarlint/issuestore/index.pb
>
> These were likely already committed at the previous commit(s) and now
> have some changes. Try, say:
>
> $ git log -- .idea/sonarlint/issuestore/index.pb
>
> to see what commit added the file.
>
> In addition, try:
>
> $ git check-ignore .idea/sonarlint/issuestore/index.pb
>
> to check if the file you think is ignored is in fact ignored, as it'd be
> the simplest explanation of your troubles if it isn't.
>
> HTH,
> -- Sergey
Previous: Sergey OrganovNext: Andreas Schwab
Message 9 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.