From the course: Programming Foundations: Version Control with Git
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Merging a branch - Git Tutorial
From the course: Programming Foundations: Version Control with Git
Merging a branch
- [Instructor] The branching workflow is helpful because it lets you keep your work-in-progress separate from the main branch. And when you're ready to move your work from the feature branch to the main branch, you'll need to merge the branch. Let's go over how to do this with GitHub Desktop. Start by checking out the branch you want to merge into. In this exercise, it's the main branch. We did this at the end of the last exercise, so you should still see it under the Current Branch. If not, make sure to switch to it first. Next, click on the button at the bottom of this section. Choose a branch to merge into main. A new window will open. From here, we'll select theme-update to merge into main, then create a merge commit. Once that's complete, it will go back to the changes view. Under the History tab, we can see the commit that was added in the theme-update branch has now been merged into the main branch. Now we can push this commit to the remote repository using the Push origin…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Using Git GUIs1m 10s
-
(Locked)
Setting up GitHub Desktop4m 43s
-
(Locked)
Working with repositories3m 49s
-
(Locked)
Adding and committing changes6m 44s
-
(Locked)
What is Git Branching?1m 26s
-
(Locked)
Working with branches3m 45s
-
(Locked)
Merging a branch2m 39s
-
(Locked)
Challenge: Putting it all together1m 18s
-
(Locked)
Solution: Putting it all together4m 15s
-
(Locked)
-