Managing Branches
List with git branch, create with git branch name, rename with -m and delete merged branches with -d. -D forces deletion.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git branch feature
git branch -m feature feat
git branch --list
git branch -d feat
git branch --listResult
feat * main Deleted branch feat (was 9d8fa7f). * main
Exercise
Delete a merged branch.
git branch feat
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.