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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events