The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Merge two repositories with commit history and source code

Vijay Ahire
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!
March 11, 2019

Hi,

I would like to know how we can merge two different repositories with their commit history and source code in Bitbucket. Please note, both repositories has commit history from different users. I have tried following git commands but it fails with mentioned error.

git clone <forked_repo_url>
git clone <api_repo_url>
cd <forked_repo>
git checkout master
git remote add api_remote <api_repo_url>
git fetch api_remote
git merge api_remote/master --allow-unrelated-histories
git commit -am "merged histories"
git push ---> fails here with pre-receive hook: You can only push your own commits to this repository.

Kindly let me know how to achieve this kind of scenario in Bitbucket.

Any help would be highly appreciated.

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events