Skip to main content
Module 3 · Lesson 3 of 412/34 in the course~16 min
Module lessons (3/4)

Branch naming, renaming & safe cleanup

Lesson preview5 hands-on exercises readyGit & Modern Collaboration · Module 3 — Branches as Lightweight Pointers

Adopt clear branch naming conventions, rename refs with -m and distinguish safe -d from force -D.

What you'll learn in this lesson

  • Follow predictable branch naming conventions (feat/*, fix/*, chore/*, docs/*).
  • Rename local branches cleanly using git branch -m <old> <new>.
  • Distinguish safe deletion (git branch -d, blocks unmerged work) from forced cleanup (git branch -D).

Overview

Left unchecked, repositories accumulate dozens of ambiguous refs (test2, patch-final-v3, wip). Adopting clear slash-namespaced prefixes turns git branch output into live project documentation:

Watch how integrated vs abandoned branches behave topology-wise inside the Branch & Merge Lab:

Sections covered in this lesson

  1. 1Keeping Your Branch List Clean & Searchable
  2. 2Compare Merging Cleanup in the Graph Lab
Pro Lesson · Module 3 — Branches as Lightweight Pointers

Unlock "Branch naming, renaming & safe cleanup" and the full Git & Modern Collaboration curriculum

Adopt clear branch naming conventions, rename refs with -m and distinguish safe -d from force -D.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Git & Modern Collaboration plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.