From the course: Designing and Implementing Source Control using GitHub and Azure DevOps
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Understanding Git branches
From the course: Designing and Implementing Source Control using GitHub and Azure DevOps
Understanding Git branches
- [Instructor] Git branches are a powerful feature that lets developers work on different versions of the same code base simultaneously. Let's talk about what Git branches are, how they work, and why you should use them. When you create a new Git repository, you start with a single branch called master, or more recently, main. This branch represents the main version of your code base, which everyone on your team will be working on. But what if you want to work on a new feature or fix a bug without affecting the main version of the code? This is where Git branches come in. To create a new branch, you use the git branch command. It is common practice to name a new branch based on its purpose. Let's say you want to create a branch for a new feature you're working on. You might call this branch New Feature. Once you've created the new branch, you need to switch to it using the git checkout command. Now you're working on the…
Contents
-
-
-
-
-
-
(Locked)
Understanding Git branches1m 45s
-
(Locked)
Creating a Git branch3m 2s
-
(Locked)
Using pull requests2m 4s
-
(Locked)
Merging a pull request in Git2m 26s
-
(Locked)
Understanding Git merge methods2m 36s
-
(Locked)
Performing a merge and rebase4m 51s
-
(Locked)
Handling merge conflicts3m 30s
-
(Locked)
Git branching strategies2m 16s
-
(Locked)
Using the Git flow branching strategy4m 41s
-
(Locked)
-
-