So, I just watched the twitch broadcast on how to set up Git and I think I understand everything that was talked about. But what they didn’t talk about was how to pull down specific commits into another branch. Here is the scenario.
I don’t envision ever having to push changes up to Epic but I often need to pull down specific commits that are made into the master branch as I’m working w/some cutting edge changes.
I forked the engine repository and created another branch called “release-plus” from the “release” branch. So my goal is to have my release-plus" branch mirror the “release” branch plus specific commits made to the “master” branch.
How is this achieved? Again, I already have a “release-plus” branch set up that was created from the “release” branch. I just need to know how to get a specific commit from the “master” branch and merge it into the “release-plus” branch given the commit identifier??
I’m new to this so please provide specific commands if possible!!! Thanks! -jeff
You need the hash (the short one or the long one, doesn’t matter) for the commit you want to incorporate and then you use the command line:
git cherry-pick hash
Some thing will come in cleanly, others must be edited, and there are changes depending on a whole lot of other commits where its getting probably to much work to try it.
How does it know to cherry pick from my master branch and put it into my release-plus branch? How do other users incorporate specific changes. Do they do it manually??
Also, the developers at Epic have fixed a few bugs for me in the last few days and they continue to refer to them as CL XYZ. I can’t figure out how to find the hash based on the CL # they give. Searching by CL # doesn’t yield any results. I could look through the commits one at a time but there are too many in my opinion.
Use ‘git gui’ and gitk. The changes are pulled from all of the projects history, no matter in which branch you are, and are applied to whats checked out in the working directory.