Merge: Combining the changes from one branch into another, for example bringing a finished feature branch into the main branch.

Example

Your pull request is approved, so your mentor clicks Merge. Your commits from feature/search-filter become part of main, and the next deployment includes your feature.

How Merges Usually Happen in Teams

Most teams merge through a pull request on GitHub, GitLab, or Azure Repos, after reviews and automated checks. Locally, git merge branch-name combines another branch into the one you are on.

Merge Options You Will See

OptionResult
Merge commitKeeps all your commits and adds a merge commit
Squash and mergeCombines all your commits into one commit on main
Rebase and mergeReplays your commits on top of main for a straight history

Teams choose one style. Follow whatever your repository's settings say.

Merge vs Rebase

Both bring changes together. Merge keeps history as it happened, with merge commits. Rebase rewrites your branch's commits to sit on top of the latest main, giving a cleaner line. A safe rule for interns: never rebase commits that others have already pulled. This is a common Git interview question.

When a Merge Fails

If both branches changed the same lines, Git stops with a merge conflict and asks you to decide the final code.

Related terms

Previous term: Meeting Etiquette  |  Next term: Merge Conflict

Related guides

Frequently asked questions

What does merge mean in Git?

Merging combines the changes from one branch into another, such as a feature branch into main.

What is the difference between merge and rebase?

Merge combines branches and keeps history as it happened. Rebase moves your commits on top of another branch for a straight history.

What is squash and merge?

An option that combines all commits from a branch into a single commit when merging.

Who merges a pull request?

Depends on the team: sometimes the author after approval, sometimes a reviewer or lead.

Explore more internship terms

The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.

Browse all 199 terms
Dhaivat Ajwaliya

About the author

Dhaivat Ajwaliya

Dhaivat has 16+ years of experience in the IT industry, working on AI and cloud technologies, project delivery, and engineering leadership. He has interviewed and mentored many interns, wrote The Lost Intern, and runs the non-commercial Career Impact Initiative, mentoring students for free.