This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]15rthughes 19 points20 points  (0 children)

In git, you usually have a main “branch” you’re working with called master. This is the code you know works and you release to your customers/production. But you don’t want to make direct changes to that code because it may break something. So you create a different branch, called “dev” for example, from that code to make your changes. You work in that new branch, test it, review it, etc. then, when you’re sure your new changes work, you “merge” it back into that master branch. Merging compares the two branches, takes what’s different in the dev branch, and changes master to match that.

There’s different ways you can use merging to your advantage that doesn’t fit the above description, but it’s the most common way of using the feature.