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 - 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
-
-
-
Cloning with limited history1m 33s
-
(Locked)
Adding to a previous commit4m 36s
-
(Locked)
Identifying your changes2m 26s
-
(Locked)
Managing multiple remotes2m 42s
-
(Locked)
Cleaner logs3m 25s
-
(Locked)
Using Git to hunt down bugs5m 7s
-
(Locked)
Working on multiple branches3m 19s
-
(Locked)
Creating a .zip file2m 57s
-
(Locked)
Getting rid of quick fixes4m 48s
-
(Locked)
Marking items without branching4m 8s
-
(Locked)
Removing untracked files2m 44s
-
(Locked)
Renaming branches2m 31s
-
(Locked)
Remove local, keep master3m 15s
-
(Locked)
Picking specific commits4m 30s
-
(Locked)
Creating a safety net for fixes2m 51s
-