From the course: Coding Exercises: Git

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Picking specific commits

Picking specific commits - Git Tutorial

From the course: Coding Exercises: Git

Picking specific commits

(video game music) - [Instructor] Let's say you're working on a branch to update some of the libraries that you're using in your project. However, after a bit you realize that it would be fine to bring some of those commits over to the main branch. How do you bring only specific commits from one branch to another? I'll give you a couple seconds to think about how you would do something like this. (video game music) Now, what I would do here is use a feature called cherry picking. Now, cherry picking allows you to pick specific commits from one branch and move them to a different place. So if I do a git branch right here, you'll notice that I have two different branches, main and updates. And if I go into the updates branch, you'll see that some of the changes that have been made here are importing a different JavaScript file, different CSS, and there's some other changes to make this dropdown work 'cause that's one…

Contents