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

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…

Contents