Git · Branches and integration

git branch

Lists local branches. Add -a for remote refs and -d to delete a merged branch.

Syntax
git branch --list

Example

Example
git branch
git branch -a
git branch -d feature/done

More in this group

git checkout git cherry-pick git merge git merge --abort git switch git worktree Merge conflict markers

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course