git (7) -- git cherry-pick 挑取分支做 hotfix

git (7) -- git cherry-pick 挑取分支做 hotfix_第1张图片

git branch hotfix
git checkout hotfix
mubi@mubideMacBook-Pro git_command_test [fix] $ git log -3
commit df897aa492ca23fb4d022079260b6cba0b6b5797 (HEAD -> fix, origin/fix)
Author: doctording <[email protected]>
Date:   Fri Jan 18 22:41:50 2019 +0800

    change 2

commit 204312cb7773e4e5cb6b67403d9ead34bc83f097
Author: doctording <[email protected]>
Date:   Fri Jan 18 22:41:12 2019 +0800

    add 1

commit 1f4e995adb399623023939cfbfa1b38cc9dad9b6
Author: doctording <[email protected]>
Date:   Fri Jan 18 22:03:20 2019 +0800

    delete and change

挑取两个commit 弄到hotfix, 然后git push origin hotfix

git cherry-pick 1f4e995adb399623023939cfbfa1b38cc9dad9b6
git cherry-pick df897aa492ca23fb4d022079260b6cba0b6b5797

git (7) -- git cherry-pick 挑取分支做 hotfix_第2张图片

你可能感兴趣的:(开发工具技能)