unable to resolve reference : reference broken. How to solve this?

Venalyn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 1, 2019

it -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --prune origin
From https://bitbucket.org/ngeksyo/mac-haik-crm
* [new branch] Jaison/master_branch -> origin/Jaison/master_branch
error: cannot lock ref 'refs/remotes/origin/dale/campaign_template_builder': unable to resolve reference 'refs/remotes/origin/dale/campaign_template_builder': reference broken
! [new branch] dale/campaign_template_builder -> origin/dale/campaign_template_builder (unable to update local ref)

1 answer

0 votes
bgannin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2019

Hi @Venalyn,

Your local working copy and the remote repository are different enough that Git is unable to resolve that. I recommend cloning the remote repository again to a new location, create a patch from the commits or differences, and then apply it to a new branch. Hope that helps.

Brian Ganninger
Principal Developer, Sourcetree

mvaldes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2021

Hi @Venalyn

@bgannin's solution in large projects is a little: kill a fly with cannonball. You can remove the references to the failing branch in packed-refs, info/refs inside the .git folder

Regards,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events