git cherry-pick 和 merge upstream
自己有两个local 别人也有两个local 如何cherry pick 并merge upstream?
- git fetch origin refs/changes/45/12345/1
- git checkout -b temp-branch FETCH_HEAD
- git checkout feature-branch && git rebase temp-branch
- git merge upstream/main
或者用 git cherry-pick commit1^..commit3 前提是你知道分叉点在哪