How to Fix Codebase Indexing Issue

Hey! I have been looking to solve a codebase indexing issue for a few days, and finally found a solution.

This was my issue, the indexer didn’t find any files:

025-02-13 09:19:39.075 [info] Starting repository upload from scratch.
2025-02-13 09:19:39.075 [info] Uploading 0 files.
2025-02-13 09:19:39.075 [info] Uploading 0 files.
2025-02-13 09:19:39.076 [info] Total number of files to embed: 0
2025-02-13 09:19:39.076 [info] Not aborted
2025-02-13 09:19:39.076 [info] Starting while loop.
2025-02-13 09:19:39.077 [info] Total number of files to embed: 0
2025-02-13 09:19:39.077 [info] Not aborted
2025-02-13 09:19:39.077 [info] Starting while loop.
2025-02-13 09:19:39.351 [info] Finished indexing repository.
2025-02-13 09:19:39.351 [info] Indexing job successfully done or aborted.

It turns out I had a .gitignore file several folder levels up from my project, that was ignoring everything. So, to solve this, do several times from your project:

cd ..
ls -a | grep .git

And delete any misplaced .git folder and .gitignore file.

The Cursor team failed to troubleshoot this so I am expecting a job offer from them soon.

1 Like

Hey, thanks for finding and sharing your solution!

Oh, nice catch! Thanks for sharing!