eg repo doctor
repo doctor diagnoses and repairs the current repository. You have to be in a git repository.
eg repo doctor
There are no arguments.
Every problem is printed together with the repair it proposes. Interactive mode confirms each repair. In non-interactive mode the command changes nothing and fails when at least one problem is found, so automation notices an unhealthy repository.
If nothing is wrong, it prints that the repository looks healthy. After a repair actually ran, it prints that the current repository was repaired.
What it looks for
elegant-git.repo-idis unset — stamps a matching registry entry, or tells you to runeg repo configureif there is none- the id has no registry entry — re-adds this repository to shared memory
- the registry path differs from the current directory — updates
current_pathand keeps the old one inpath_history workspace_idis empty or points at a missing workspace — pick a workspace and link- per-repo memory
repo_idorworkspace_iddiffers from the registry — rewrites it - local git identity differs from the linked workspace — re-applies the workspace with force
- legacy
elegant-git.default-branch/protected-branchesstill in local config — moves them into per-repo memory - global Elegant Git is acquired but local elegant aliases or an acquired marker remain — removes them
- personal or repo-tracked hooks still live under
.workflows/— moves them; tracked hooks need a commit afterwards, so doctor prints thegit add/git committo use - hook files still use the
git-command prefix — renames them toself-
The hook layout itself is on the hook files page.