Git 2 reference · 6 entries

Git Branching and Merging

Work on branches and combine them: git branch, switch, merge, rebase, cherry-pick and tag.

NameDescriptionSince
git branch List, create, rename and delete branches, and see which branches are merged.
git switch Switch to another branch, or create one and switch to it with -c; the modern replacement for git checkout branches.
git merge Combine another branch into the current one, fast-forwarding when possible or creating a merge commit.
git rebase Replay your branch's commits on top of another branch for a linear history, or clean up commits with -i before sharing.
git cherry-pick Apply the changes of specific commits from another branch onto the current branch as new commits.
git tag Mark releases with lightweight or annotated tags, list them, and push them to a remote.

Was this page helpful?