0

I'm working with a recent install of git, and it seems something is misconfigured, although there's nothing relevant in my user profile's .gitconfig. I use Gitea locally, and when I try to clone repos created in Gitea, I can't actually get the contents of the repo, due to this error:

Your configuration specifies to merge with the ref 'refs/heads/main' from the remote, but no such ref was fetched.

If I force git to pull from the correct origin (which is just master), everything's fine. But why is it defaulting to the wrong branch? I can't find where this is configured to change the behavior. I'm guessing I misconfigured git when I first installed it, maybe?

To add:

I tried running git config --global init.defaultBranch master, and I also reran the installer and explicitly input "master" as the default branch name. When I clone repos, it is still defaulting to "main."

CXL
  • 1,094
  • 2
  • 15
  • 38

0 Answers0