16

My issue is not this issue.

On pull, I am getting the following error-

error: cannot update the ref 'refs/remotes/origin/features/name/surname’: unable to append to '.git/logs/refs/remotes/origin/features/name/surname': Not a directory

Adding user permissions did not cut any ice.

Solution- Then simply deleting the branch from GitHub resolved the issue.

Interestingly this branch has a different directory structure than other branches.

While other branches look like-

refs/remotes/origin/features/name

This one looks like-

refs/remotes/origin/features/name/surname
Farrukh Chishti
  • 7,652
  • 10
  • 36
  • 60
  • 4
    This is the same problem as in https://stackoverflow.com/q/54229866/1256452, with the same kind of solution: don't try to use both `feature/joe` *and* `feature/joe/smith` as branch names, as Git forbids such a combination. – torek Jan 17 '19 at 19:15
  • try this https://stackoverflow.com/questions/2998832/git-pull-fails-unable-to-resolve-reference-unable-to-update-local-ref/30939030 – Aborn Jiang Oct 18 '19 at 03:28

1 Answers1

24

In your local repo, delete .git/logs/refs/remotes/origin/features/name.

There is probably a file where it's expecting a directory.

Kirby
  • 15,127
  • 10
  • 89
  • 104
johntrepreneur
  • 4,514
  • 6
  • 39
  • 52
  • Thank you! In my case it was the parent directly like `.git/logs/refs/remotes/origin/features` that had to go. – Kirby Dec 08 '22 at 18:26