Renaming and Deleting Branches
git branch -m renames and -d deletes a merged branch. -D forces deletion.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git branch temp
git branch -m temp topic
git branch
git branch -d topic
git branchResult
* main topic Deleted branch topic (was 114e5ce). * main
Exercise
Delete merged.
git branch topic
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.