
Simply log into the GitLab web app, choose the option to create a GitLab merge request, specify the master branch as the source and the protected branch as the target of the merge. Since the release branch is protected, the process is a little different. If a developer wants to merge the GitLab master into a protected branch, the proper approach is to perform a merge request. When the merge is complete, the release and master branch will be in sync. I can rectify this problem with a GitLab merge master into this branch. As a result, the release branch is out of sync with master. That sequence of events somewhat violates proper GitFlow rules, because those branches should’ve been merged into the release branch first. In a previous GitLab tutorial, both the develop branch and the hotfix branch was merged into master. Git push origin fun_feature GitLab master to branch merge request

How you solve it is up to you, either manually removing or using the smartness of your IDE to identify and keep certain versions as such.The remote GitLab branch to delete is name feature_fun. If you have files with same name in these repositories, merge conflicts can appear. You can surpass this with the following flag with the last command Since we are trying to merge two separate repositories, git checks for co-relation between merge and commits histories and blocks the merge process. So, first checkout from that to master with git checkout masterįatal: refusing to merge unrelated histories Notice that the last command had you checkout of the master branch and into a new-branch.


So we copy it onto a new local branch.Ĭheck for files if you have to, see if you’ve correctly pulled in the right data. Note that the content of second repo is in the remote still, which we fetched but can’t yet access. Step 3: Fetch content from repo2 into this remote Run : git remote -v to check the remotes you have Now you will have the following remotes origin (fetch) origin (push) your-custom-remote-name (fetch) your-custom-remote-name (push) Step 2: Create another remote in this clone which points to repo2-our second repository. Step 1: Clone one of the repositories (say repo1). Then two merge these two, you could follow these steps: You have two repositories on git, say repo1 and repo 2, each with a readme.md file.
