From the course: Git: Branches, Merges, and Remotes

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Rename branches

Rename branches

From the course: Git: Branches, Merges, and Remotes

Start my 1-month free trial

Rename branches

- [Instructor] Now that we know how to create branches, let's learn how we can rename our branches. First, let's remind ourselves what branches we have. Git branch is the command to do that. You can see that I have three branches, and one of them is called new underscore feature, and that's my currently checked-out branch. Now new feature isn't a very well-named branch. I did it at the very beginning. We really would rather have something descriptive so that people know what it is, so that I can remember five weeks from now what this feature was all about. So what was this feature about? Let's use git diff master with new feature and we can see what changed. We changed something in the title. Let's say that we did this for search engine optimization purposes. So let's rename it something like that. Let's call it seo underscore title. So in order to rename a branch, let's go look at the documentation. Git help and then branch, and then find out what it tells us. If you take a look…

Contents