Faced a bug in GitLab. One of my projects have over 50 modules. So when I merge branches, I use a bash script, instead of using the GitLab merge UI. This has worked fine so far. This time I faced a weird issue. The merge commit transferred the commit history from the source branch to the target branch, but not the content of the source branch. I was trying to merge the branch cr_integrate to the branch cr_release. Locally, I had cr_release checked out.
The script I used for merge is given below:
git pull
git merge --no-ff origin/cr_integrate -s ours
git add *
git commit -m "Integrate merged into Release by script"
git push
The project contains submodules, and the content of the .gitmodules file is different for different branches, hence I used -s ours to avoid conflict. Is there something wrong with the script or is this a bug with GitLab?