The following commands used to merge the branch from project-1 to project-2 repository.
1) Clone the target repository (Eg: project-2):-
git clone ssh://blr-user@gerrit-server:29418/project-2 && scp -p -P 29418 ssh://blr-user@gerrit-server:hooks/commit-msg project-2/.git/hooks/
2) Changing the remote origin:-
git remote add project-1-origin ssh://blr-user@gerrit-server:29418/project-1
3) git fetch project-1-origin
4)git checkout test-branch
5) git pull --rebase
6) git merge --allow-unrelated-histories --no-ff --no-commit release_branch
7) git commit -a
8) git push origin HEAD:refs/for/test-branch
As soon we pushed the changes to gerrit, On Gerrit GUI it shows “Submit including parents” for the review request.
Note: There is no dependency request as well, still it shows above message. Any suggestion to fix the problem would be helpful.
Yes changed the directory after step-1.
So for this situation what is the best way to merge multiple commits in a single push with history?
So for this situation what is the best way to merge multiple commits in a single push with history?