Multiple files are out of sync but git doesn't seem to notice

I have two repos that claim to be clean. One of them was originally cloned from another and was used to work with developers.

There are several files that I see are not the same. However, when I try to pull anyway, he says that everything is in the know.

How is this possible?

Has this file really missed the commit? ... but shouldn't the difference be noticed independently?

Do I need any update?

+3
source share
3 answers

, . b, B b ( ) a git pull B "Already up-to-date."

( .gitignore)

0

, , , , .

, - . , .

, . GIT.

0

, .

, git

cat file # show file in working copy
git show :file # show file in index/staging

these outputs were clearly different, and git status said it was a clean working copy.

After some searching, I found that the index was probably corrupted and found https://makandracards.com/makandra/5899-how-to-fix-a-corrupt-git-index

rm .git/index
git reset

which fixed the problem for me. If any files were delivered, they are probably lost, but at least now git sees the changes in the local working copy.

0
source

Source: https://habr.com/ru/post/1747315/


All Articles