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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

164 views 9 2
Join discussion

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