How to Create a Git Branch From Master

Published: 04 October 2021
on channel: Cameron McKenzie
13,137
47

Here's a quick example of how to create a new Git branch from Master or Main.

There are three basic approaches to follow when you need to create a Git branch from master or main.

You can checkout the master branch and then perform a
git branch branchname
command.

Or, you could use git branch checkout -b from the main or master branch.

And finally, you can provide the name of the master branch as the last option in the git branch branchname command.

Either way, the creation of a new Git branch from Master is a fairly straight forward Git operation.


Watch video How to Create a Git Branch From Master online, duration hours minute second in high quality that is uploaded to the channel Cameron McKenzie 04 October 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 13,137 times and liked it 47 visitors.