Episode 11 of 14
Understanding Branches
Learn about Understanding Branches
Understand the concept: A branch is an independent line of development, allowing you to work on a new feature without affecting the main codebase.
Identify the default branch: By default, every Git repository starts with a single primary branch, usually called master or main.
Why use branches: They isolate experimental work, meaning you can safely make mistakes and try out ideas.
View existing branches: Run the command git branch to see a list of all local branches in your repository.
Identify the current branch: The branch you are currently on will be highlighted and marked with an asterisk in the branch list.
Create a new branch: Run git branch followed by the new branch name to create a split from your current position.