Error when creating a Pull Request in Repository


Just starting out on stash here and I have had the following error code when trying to select a source branch when creating a Pull Request within one of my repositories.

Below is the error;

An error occurred while executing an external process: '/usr/bin/git for-each-ref --sort=-committerdate --format=%(refname)|%(refname:short)|%(objectname) refs/heads/' exited with code 128 saying: fatal: missing object 0000000000000000000000000000000000000000 for refs/heads/feature-fix-honolulu-unit-tests

Any help would be massively appreciated?


1 answer

As this issue is resolved in a support ticket, here is the resolution for reference:


"feature-fix-honolulu-unit-tests" exist in Stash filesystem but the remote ref is broken.

Trying to delete the branch or checking out gives the following error:

? muve git:(develop) git push origin :feature-fix-honolulu-unit-tests 
error: unable to delete 'feature-fix-honolulu-unit-tests': remote ref does not exist
error: failed to push some refs to 'ssh://'

? muve git:(develop) git checkout -b feature-fix-honolulu-unit-tests
fatal: A branch named 'feature-fix-honolulu-unit-tests' already exists.


Quote from Bryan Turner (Atlassian Stash developer)

Most likely, since creating such a ref shouldn't be possible, you'll have to fix it directly on the filesystem. It appears (from your support zip; thanks for that) that the MUVE2/muve repository is at <tt>/mnt/stashDrive/data/repositories/336</tt>. Someone with filesystem access will need to check for the presence of <tt>/mnt/stashDrive/data/repositories/336/refs/heads/feature-fix-honolulu-unit-tests</tt> (a loose ref) and, if it's there, remove it. Whether the loose ref exists or not, they'll also need to look for a <tt>refs/heads/feature-fix-honolulu-unit-tests</tt> line in<tt>/mnt/stashDrive/data/repositories/336/packed-refs</tt> and remove that if present.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

690 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you