You can cherry-pick a merge instead of a commit: git cherry-pick -m 1.If you want to select more than one commit at once, you can add their commit hashes separated by a space: git cherry-pick C D.It will have a new and different commit hash. If you run the git log you will see that your cherry-picked commit at the top of the feature branch. Cherry-pick the commit: git cherry-pick C.Checkout to the branch that you want to insert the commit into, in your case this is the feature branch: git checkout feature.Selecting the commit hash from the GitHub page.Make sure you are on the correct branch: git checkout master. By typing git log -oneline, to get the log of your commits history.There are a few steps you should follow to get the job done: Let’s say you want to pick a commit C from the master. Let's cherry-pick a commit from the development and add it to feature branch by using the commit hash.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |