remove local branch gitr code example Example 1: delete local branch git git branch -d <branch_name> Example 2: git delete local branch git branch -d test