Question

I want to merge 2 Repositories in the Same Project in Stash. The complete History should be merged too. Is there any way to do this?

Was it helpful?

Solution

Stash developer here. This is really a Git question. Depending on how you want/need the repository merged I would recommend you first check out Git Subtree:

http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/

Alternatively you can just run git pull ../other_git_dir in your first repository, and that will fetch all the commits on the default/current branch (eg. master) into your second repository. Note that this only works for one branch at at time. Some more reading:

http://scottwb.com/blog/2012/07/14/merge-git-repositories-and-preseve-commit-history/

If you're actually talking about creating a pull request then you can't (currently) do this across two unrelated (eg. non forked) repositories in Stash. You could however pull the history from one repository into another (as above) and then create the pull request that way.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top