Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket can not create merge diff or merge

Oscar Edvardsson December 8, 2017

We're using the Gitflow Workflow and have migrated from a Mercurial repo (where we were using the same workflow).

Between the previous release and this, we did some management of a third-party library, previously cloned from git (when we were using Mercurial). Not entirely sure about this part, but I believe as part of the conversion, the .git-folder in the library was deleted.

Now, I created a pull request to merge our release branch (which does not have the .git folder) with the master branch (which has the .git folder). Bitbucket Server says "Bitbucket Server could not create the merge diff for this pull request"

The merge button is available, and if I try to perform a merge I get

'/usr/bin/git reset --quiet 4d5ac1b2a903ab1cd371c2fb39dc87fca107fdfa --' exited with code 128 saying: error: Invalid path 'vendor/CException/.git/HEAD' fatal: make_cache_entry failed for path 'vendor/CException/.git/HEAD'

I can however merge locally on my machine.

Any ideas on how to resolve this?

1 answer

0 votes
Roger Barnes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2020

It sounds like the repository was either:

* corrupt in some way and the Git operation on the server was unable to do it using the approach it uses (this can differ to how you'd merge locally). Or...

* the git repository was manipulated behind the scenes (ie directly on the filesystem) on the server. This isn't a good idea.

The fix in either case is going to depend on what exactly was changed. Deleting .git folders from the root of a repository effectively renders it no longer a git repository. This isn't likely to be what you want, unless you're planning to manually add those files into another healthy repository.

Anyway, I hope you got that resolved. I'm writing an answer here in case anyone else comes across the same issue and ends up here.

TL;DR: don't delete the .git folder unless you know what you're doing, and never manipulate git repositories stored in Bitbucket Server directly on disk.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events