Learn How to Delete Branches With Git for Development


show more Deleting branches provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training show less
please wait ...

Deleting branches

We've learned how to create branches, now we're going to learn how to delete them. I've already created several branches, git branch will show that list. Now regardless of whether you've the same ones as me or not, make sure that you switch to the master branch, so that's git checkout master. That will put you on a master branch with me. Once you are there, we're going to create a new branch, git branch, and then we just provide the name of the new branch that we wanted to create. We're going to call is one branch_to_delete. That will make it nice and clear. So git branch will now show that in the list.

Notice that I'm still on the master branch. I did not create it and switch to it, I just created it, that's important. So now we want to delete it. It's really simple; git branch with the lowercase d option. So -d or you can use --delete if you'd rather. Most people just use the lower case d, and then the name of the branch that we want to delete. So git bran...

Deleting branches
Video duration: 4m 18s 6h 25m Beginner

Viewers:

Deleting branches provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training

Subject:
Developer
Software:
Git GitHub
Author:
please wait ...