Check if you have a master file in .git\refs\remotes\origin
If you do, delete it, then try your git pull again.
As an alternative, simply try and clone again your repository in another folder just to see if the error persists.
As torek mentions in the comments
the string "reference broken" means that the indicated ref name exists, it just has an invalid SHA-1 hash ID attached to it.
That's not supposed to happen (the ref name itself should have been destroyed by now), so it's not clear how this came about.
You can see the error message in refs/files-backend.c#lock_raw_ref()
if (errno == EINVAL && (*type & REF_ISBROKEN)) {
strbuf_addf(err, "unable to resolve reference '%s': "
"reference broken", refname);
That check was introduced in Git 2.10 (April 2016) which mentioned:
This makes use of a new function, lock_raw_ref(), which is analogous to
read_raw_ref(), but acquires a lock on the reference before reading it.
This change still has two problems:
- There are redundant
read_ref_full() reference lookups.
- It is still possible to get incorrect reflogs for symbolic references
if there is a concurrent update by another process, since the
old_oid
of a symref is determined before the lock on the pointed-to ref is
held.