Skip to main content

Merging Branches

Merging branches can often have important impacts on the work of others using the repository. It is best to use a Forge to coordinate merges using Pull Requests. Reference the Pull Requests page and talk to your peers before merging (epically into main branches).

Due to the fact that it's most preferable to do a standard 3 point merge, that is what I will be covering here. Merges can be done using the merge sub command. Make sure you are on the branch you would like to merge into, as the merge command will take another branch and merge it into the current one. This means, if you are merging a feature into the main branch, you would want to run the merge command while in the main branch. To merge another branch into the current one, you can use the following:

git merge other-branch

There is a good chance you will be left with issues in resolving the merge, as any number of things could get in the way. I'm going to assume though, that you have only merged yourself if you knew that there would not be repercussions like this, and say that a Forge provides much better tools for making sure conflicts are handled well. If you are getting merge conflicts in the command line, talk to a team member to work out the specifics, and find more complex instructions online. I will likely include more details on how to resolve those later, but I would really prefer to just do some 1-on-1s for now if anyone ever fumbles the bag.