How does auto "Resync" index works?

How does the auto “resync” index work?

Does Cursor automatically “resync” the index:

  1. everytime I change from one branch to another?

  2. everytime I create new files with Composer

  3. everytime I open the IDE

  4. everytime I manually add some files?

Knowing this will help us save time.

Thanks