Why I can not compare and merge changes from parent to fork repo?
Asked by Hasmukh Mistry:

\<screenshot_removed_for_privacy\>  

I have forked the repo. Now When I try to compare and merge changes from parent it ends up with an error. Please check network response below too.  

```
{ 
    "type": "error",
    "error": {
        "message": "Something went wrong", 
        "id": "de6ea9ded3ab4b77bab934d11337fb18"
    }
}
```


Answers:
author: Mark C
body: Hi [@Hasmukh Mistry](/t5/user/viewprofilepage/user-id/5578554)

Thank you for reaching out to the community.

Would it be possible for you to confirm how are you currently merging from the forked repo to the parent repo at the moment?  

Regards,  
Mark C

comments: author: Hasmukh Mistry
body: Hello [@Mark C](/t5/user/viewprofilepage/user-id/1210823)   

Thanks for responding.  

I usually navigate to Branches \>\> From Right Side '...' \>\> Compare Commits, Branches or Tags.  

Which forms the url like : <https://bitbucket.org/workspace/repo/branches/compare>  

Then I compare the Source AND Destination. I generally prefer Fast Forward Merge when i sync parent to my fork repo. And this is the only place I found this option.  

Let me know if you need any further information  

Thanks,  
Hasmukh  


author: Hasmukh Mistry
body: Hello [@Mark C](/t5/user/viewprofilepage/user-id/1210823)   

Also , I am merging changes **from Parent** to **Fork** . Not to the Parent  

Thanks.  
Hasmukh


author: Mark C
body: Hi [@Hasmukh Mistry](/t5/user/viewprofilepage/user-id/5578554)

<br />

May I know if you've tried using the "Sync" button located from the repository Overview page?  

Regards,  
Mark C


author: Hasmukh Mistry
body: Hi [@Mark C](/t5/user/viewprofilepage/user-id/1210823)

Yes I tried, But that creates merge commit on my fork repo. And I would like to avoid that.  

Thanks


author: Theodora Boudale
body: Hi Hasmukh,

Please allow me to step in as Mark is out of office at the moment.

I checked the error code you provided in your post, and our system shows a **Request Timeout Error** for this code. We have the following limits for diffs in Bitbucket Cloud:

* <https://support.atlassian.com/bitbucket-cloud/docs/limits-for-viewing-content-and-diffs/>

Does the diff between these two branches exceed any of these limits?

You can sync the two repos locally if this is not possible from the UI:

**1.** Clone the fork

**2.** Navigate to the clone directory of the fork and add another remote to the clone that points to the parent

```
git remote add parent https_or_ssh_url_of_parent_repo
```

**3.** Fetch the branches from the parent with

```
git fetch parent
```

**4.** If master is not the currently checked out branch in the clone, check out master branch

```
git checkout master
```

**5.** Then, merge the parent's master into your local master

```
git merge parent/master
```

If the fork's master doesn't have any additional commits that don't exist on the parent, and if you haven't set up Git on your computer to always merge with a merge commit, Git will merge with fast-forward. You can then push this to the fork.

Just a heads up, I removed the screenshots from your post for privacy reasons, as they were showing workspace IDs and repo names.

Kind regards,  
Theodora


author: Hasmukh Mistry
body: Hi Theodora  

Thanks. Yes these steps work too. And you are right about exceeding limits. I guess I have to update my fork locally and push to bitbucket.   

Thank you


author: Theodora Boudale
body: You are welcome, Hasmukh. Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud