Loading...
 
Skip to main content
(Cached)

Merging branches in Git

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
    Image
    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
    Image
  • Then select "Merge into Current" on the origin/21.x branch (in this case)
    Image
  • Then push the merged commits back to origin (gitlab.com/tikiwiki/tiki.git)
    Image
  • 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
    Image
  • If there are any conflicts you will see something like this
    Image
  • Click Merge... and you will see the merge editor
    Image
    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 this page for more details
    When all is well this message should appear allowing you to apply the changes
    Image


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.

Show PHP error messages