1

I have a large (>1G) BitBucket repository that is also backed up on Google Drive; and I have two computers (one at the office, and one at home). Things have been working fine for more than a year; however, today when I wanted to commit some code and did a git status, I got a long list:

deleted:    A/AA/a.txt
deleted:    A/AA/aa.txt
deleted:    B/BB/bbb.txt
... (a lot more here, I think it's all the files in the whole repo) ...

Untracked files:
  (use "git add <file>..." to include in what will be committed)

A/
B/
C/
... (all the folders at the root level) ...

I checked on my computer, and all the files are still there; they've just been marked by Git as newly added files...

I have a couple of questions:

  1. Why does Git suddenly mark all the files as new even though I haven't touched most of them in months? I never had this happen before.

  2. After seeing the git status, I didn't do anything since I'm afraid of loosing my previous source history if Git sees all files as new... I'm a relative novice to Git; what should I do next?

p-value
  • 608
  • 8
  • 22
  • Note that "untracked" means "not in the index", and "deleted" means "is in the current commit, but is not in the index". It looks as though your index has been clobbered. – torek Jan 20 '18 at 16:27

1 Answers1

1

The first test you can do (without touching your current repo) is setting git config --global core.autocrlf false and clone the repo again (in a different folder): does the git status still show you any diff?

The other test is to check if this is a case issue

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250