FahamLah

Commands

git merge

git merge <branch>

Risk: Safe

What it does

Joins another branch's work into the branch you are on.

When to use it

When a feature is ready to go into main.

Example

$ git merge feature/login-form

Bring the login form into this branch.

$ git merge --no-ff feature/login-form

Always make a merge commit, even if Git could fast-forward.

$ git merge --abort

Stuck in a conflict? Go back to before the merge.