Re: file is showing as modified even that it was never commited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ewa Śliwińska <kreska07@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux