git use notes (3) Cherry Pick__git

Source: Internet
Author: User

Create a local branch locally

Repo start Cherrypickbranchname.

Then git cherry-pick-x <commitid>

If there is a conflict, then use the Meld tool I mentioned earlier.

Meld *********.java (conflicting files)

You need git add after you have modified the file. Then git commits. This completes a change of cherrypick.

You can pick n change at once in a local cherry.

If you feel that the current change does not need to be used during the Cherry-pick process

git reset

Git checkout.

This allows you to discard the current change.

If you have a local branch that has 10 change, and I want to discard 5th, I'll use git revert.

Of course I have review site here, just to the first 4 change before the merge.

Then the remaining 5 change all cherrypick to another new local branch,rebase already merge code, and then repo upload.

The commit of the change is

git fetch ssh://******.com:33333/platform/vendor/semc/packages/apps/gallery REFS/CHANGES/93/200893/5 && git Cherry-pick Fetch_head

Other commands:

Repo Download Platform/vendor/semc/packages/apps/gallery 200893/5

git fetch ssh://******.com:29418/platform/vendor/semc/packages/apps/gallery REFS/CHANGES/93/200893/5 && git Checkout Fetch_head

Git pull ssh:/******.com:29418/platform/vendor/semc/packages/apps/gallery refs/changes/93/200893/5

git fetch ssh://******.com:29418/platform/vendor/semc/packages/apps/gallery REFS/CHANGES/93/200893/5 && git Format-patch-1--stdout Fetch_head

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.