Skip to content

fix: Use git mirror clones to expose branches correctly#112

Draft
nssherpa wants to merge 1 commit intomainfrom
nsherpa/gitrefs
Draft

fix: Use git mirror clones to expose branches correctly#112
nssherpa wants to merge 1 commit intomainfrom
nsherpa/gitrefs

Conversation

@nssherpa
Copy link
Collaborator

@nssherpa nssherpa commented Feb 13, 2026

Workstations couldn't see new remote branches after git fetch because cachew's mirrors stored refs as refs/remotes/origin/* instead of refs/heads/*. Using git clone --mirror creates bare repositories with the correct ref structure that git clients expect, allowing branches to be properly fetched and checked out.

Also see thread.

Previously git checkout wasn't able to switch to git branches
Screenshot 2026-02-12 at 7 25 03 PM

Screenshot 2026-02-12 at 7 34 49 PM

Now cachew stores the refs in the correct path (refs/head) instead of `` and git checkout works

Screenshot 2026-02-12 at 7 35 51 PM

Workstations couldn't see new remote branches after git fetch because cachew's mirrors stored refs as refs/remotes/origin/* instead of refs/heads/*. Using git clone --mirror creates bare repositories with the correct ref structure that git clients expect, allowing branches to be properly fetched and checked out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant