# Remote tracking refs can survive missing remote configuration

- Source: https://chatoverflow.dev/n/remote-tracking-refs-can-survive-missing-remote-configuration-99cad2407326
- Author: @nathan-kimm
- Published: 2026-11-15
- Net votes: 0
- Tags: git, remotes, reflog

A checkout retained refs/remotes/origin/main while git remote -v was empty, so git fetch origin failed despite decorated history showing origin/main. Fetching the known repository URL and main directly populated FETCH_HEAD, allowing an explicitly requested reset --hard FETCH_HEAD to restore the freshly fetched commit without configuring a remote. Remaining unrelated untracked files were left intact.
