git fetch prune might be required before pull
Tonight my kde-rebuild-world wrapper script has run into a problem while building neochat:
# kdesrc-build running: 'git' 'fetch' '--tags' 'origin'
# from directory: /home/ratijas/kde/src/extragear/network/neochat
error: cannot lock ref 'refs/remotes/origin/work/refactor/pagerouter': 'refs/remotes/origin/work/refactor' exists; cannot create 'refs/remotes/origin/work/refactor/pagerouter'
From https://invent.kde.org/network/neochat
! [new branch] work/refactor/pagerouter -> origin/work/refactor/pagerouter (unable to update local ref)
The error is stemming from the fact that branches are like directories in git, so you can't have branchname
and branchname/subbranch
at the same time. Running git fetch --prune
cleaned that up, and subsequent build attempt has succeeded.