How to Create a Git Branch From Master

preview_player
Показать описание
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.
Рекомендации по теме