History: Merging branches in Git
Source of version: 6 (current)
Copy to clipboard
''Some notes regarding merging branches in Git, so far using PhpStorm (command line version to follow)''
* Clone the main Tiki repository from https://gitlab.com/tikiwiki/tiki.git
+ {img type="fileId" fileId="1389" width="50%"}
+ This is the big one, over 3GB and will take a while
* Check out master using the "Git Branches" menu at the bottom right of the main window
+ {img type="fileId" fileId="1390" width="50%"}
* Then select "Merge into Current" on the origin/21.x branch (in this case)
+ {img type="fileId" fileId="1391" width="50%"}
* Then -+push+- the merged commits back to origin (gitlab.com/tikiwiki/tiki.git)
+ {img fileId="1392" width="50%"}
* If you get this warning dialog there have been changes to master since you last updated, so chose -+Rebase+- which will insert the changes from the origin before the merge you are doing
+ {img fileId="1393" width="50%"}
* If there are any conflicts you will see something like this
+ {img fileId="1394" width="50%"}
* Click -+Merge...+- and you will see the merge editor
+ {img fileId="1395" width="50%"}
+ Click the "Apply non-conflicting changes: All" in the top toolbar
* Sometimes that's enough to do it, as in this case, but if the conflict is more complicated you will need to resolve it manually, see [https://www.jetbrains.com/help/phpstorm/resolving-conflicts.html|this page] for more details
+ When all is well this message should appear allowing you to apply the changes
+ {img fileId="1396" width="50%"}
In this instance the rebasing part didn't seem to go totally smoothly, so i have to update the project again, and then push a second time and it worked as expected.