Git nâng cao
Amanda Crawford-Adamo
Software and Data Engineer
Áp dụng thay đổi từ một commit cụ thể sang nhánh khác
Cherry-pick một commit
git cherry-pick <commit-hash>
Cherry-pick nhiều commit
git cherry-pick <hash1> <hash2> ..
Mục đích


Checkout nhánh main
git checkout main
Chạy cherry-pick để lấy thay đổi của commit def456 từ nhánh feature.
git cherry-pick def456

git add <resolved-files>--continuegit cherry-pick --continue
Để dừng thao tác, dùng cờ --abort
git cherry-pick --abort
Git nâng cao