# Background fetching and search indexing

Control automatic fetching and local search indexing.

## Automatic fetching

GitLode fetches added repositories every five minutes by default. Fetching updates remote-tracking information; it does not merge changes into your working branch. In Settings > Sync, choose every 5, 15, or 30 minutes, Every hour, or Manually.

Turn off Automatically Fetch in Repository Settings or the repository's shortcut menu to exclude one repository. At most two automatic fetches run at once. An automatic fetch is cancelled after 120 seconds, and repository status indicates a later retry.

Background fetches do not open interactive authentication prompts. Recognized authentication failures pause repeated attempts until an explicit retry. Check the repository status or Activity for errors, then fetch manually.

Fetch on expensive connections defaults to off. Respect Low Power Mode defaults to on and pauses automatic fetch and indexing while Low Power Mode is active. Manual Git actions remain available.

## Refresh and repository switching

GitLode refreshes repository state after filesystem changes, app activation, and system wake. Command+R refreshes local state; it does not fetch from the remote.

History and working changes are loaded for sidebar repositories in the background. When available, cached data appears when you switch repositories. Repository-changing actions remain disabled until the disk refresh succeeds. An uncached repository needs an initial load.

## Local search indexing

Search indexing runs in the background and is shared across workspace windows. It can continue after a workspace closes. One indexing worker runs across repositories at a time.

Use the search menu to view Search Status, pause indexing, or resume it. Progress is also available in the search field's tooltip. Previously indexed history stays searchable. The local cache is updated when branches or tags change. Rebuild Search Index clears that cache and replaces a corrupt database. Operation history is stored separately.

See [Search syntax](https://gitlode.com/docs/search-syntax) for incomplete results and size limits.
