Instructor: If we do git branch, we see we have two different branches here. If we do git log one line, we can see that our latest branch has adsHelloWorld as the commit, and that is diverse from master, which is the reversion of the take three commit.
This is our app.js on the JSChanges branch. Let's check out master. Now our app.js is empty. Let's say we're on master and we really want that function on master, but we don't want to pull over the entire JSChanges branch yet. What we really want is just to pick this commit and move it over to master.
If we do a git log one line now, we see that the latest is revert take three, and we want this adsHelloWorld. We're going to get the hash of the commit that we want, and we're going to do git cherry-pick, and then we're going to do the hash that we want.
If we do a git log one line, we can see that our head is pointing at adsHelloWorld, but the hash is different. It's made a new commit hash as it came over and we have our function here.
If we are happy with what we have now, we can do a git push. Now, we've copied the commit from js.changes over the master and pushed it up. The commit now exists in both trees.