We have GitHub repositories mirrored to Gitlab. At some point we experienced this error on pull mirroring:
Error: Failed to create branch 'foo/bar/feature-xy': invalid reference name '<commit_sha>'.
CodePudding user response:
The error happened because the Gitlab repository already has a branch called foo/bar
, so now Gitlab doesn't allow any new additions that start with foo/bar/*
.
In our case, we deleted the branch from Gitlab since, in GitHub, the same branch was already gone, and for some reason, Gitlab doesn't sync.