016 Introduction to Git cherry-pick

preview_player
Показать описание
Here I go over git cherry pick, which is a way to apply a single commit's content to your current branch without merging with the branch it came from. I also go over one typical cherry-pick use and one example of when not to use it.

Рекомендации по теме
Комментарии
Автор

1:14 what is git cherry-pick
2:25 setup for the demo
2:45 prentend: *Bob fixed this already in his commit*
2:58 => TODO: cherry-pick (Bob's) fix onto our branch
3:56 all needed in cherry-pick: *sha-1 for the commit you want to cherry-pick*
4:14 cherry-pick command
4:50 *IMPORTANT to know: new sha-1* 5:07: *the same commit in in out local with a different commit sha-1* 5:13 *the sha-1 is different, because cherry-pick creates a new commit with the same content*
6:00 *cherry-pick is the most useful in the hotfix*
6:17 example of *incorrect way of using cherry-pick*
9:38 git cherry-pick is a merge action

ruixue
Автор

For a moment I thought like "What a waste of time? He is not going to talk. How would I understand if he doesn't talk?". Then listened his voice and in a hurry went to the below comments. Felt good finally.

bbekg
Автор

Thanks for taking the time to show the pros and cons of git cherry pick. It is very useful :).

ashishjain
Автор

Thanks a lot Dan!!! Really cool intro to git cherry-pick.

adswar
Автор

Thanks a lot, 3 years later and it's so useful

benbanda
Автор

Thanks, Dan. Great video as I am still getting good at using Git. I coach other web developers on Git, so I needed a quick refresher on cherry picking.

successfulpodcast
Автор

Just a tip, if you spare the bottom of the video, where YouTube puts the controls and the time bar, then if one pauses the video will see what is in the prompt.

YourNickIsTaken
Автор

I want to take incremental changes of each and every Git commits. Can anyone help me giving ideas on this.

sekar
Автор

hot-fixes should be merged in master asap.. right? do the proper MR? to avoid everyone else that may come across with that bug make its own hot-fix or magically be notified by a team member "that bug was fixed by me"

FiruzzZ-
Автор

what happens after you do a git cherry-pick when the merge does not appear on git status, how do you push that change? is it a change to be pushed?

MicroUrb
Автор

When i run git remote i only get origin but i want to cherry pick from my other branch in same repository.
How can i add my other branches? I have 3 branches master | dev | tec .... and i want to cherry pick only one commit from tec to dev....how can i do it? can you help?

easyvideott
Автор

Imagine we have two developers: Bob and Tom>

Bob have some work that Tom does not on myFile.txt.
Bob needs some work from Tom, so he will cherry-pick that. Also on myFile.txt.

If bob cherry-pick some Tom's work. Won't this overwrite Bob's work that Tom does not have on that file?

If yes, how to we should work on this situation ?

Ghaleon