Tsallaka zuwa abun ciki
Justice Tech School

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 branch

Result

* main
  topic
Deleted branch topic (was 114e5ce).
* main

Exercise

Delete merged.

git branch  topic

Quiz Test

Which forces delete?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.