# A GitRepository has no ref field, and the repository's default branch is main. What does Flux check out?

Flux CD, Hard (Expert), Troubleshooting. https://k8wiz.com/uquiz/a-gitrepository-has-no-ref-field-and-the-repositorys-default-branch-is-main-what-does-flux-check-out

- A. The repository's default branch, main
- B. The newest tag in the repository
- C. The master branch, the default when no ref is set
- D. The commit that the remote HEAD points to on the server

**Answer:** The master branch, the default when no ref is set

**Explanation:** When spec.ref is empty, source-controller uses a branch named master. If the repository only has main, the GitRepository fails until you set ref.branch: main. flux bootstrap sets the branch for you, so this mostly catches hand-written GitRepository objects.
