1. It is known that a commit between different branches can be used to obtain submissions from other branches using the git cherry-pick command. If the general situation is not a problem, we click Cherry-pick Copy link.
In our local warehouse directly using the link we just copied, you can cherry-pick success. But joining us Cherry-pick failed. Here we will analyze the problem of failure.
Error Stories
Conflict code (after cherry pick)
Hal3/camera3stream.cpp \
1.<<<<<<< Head//indicates that the head of the code we cherry pick over here is where the code changes to start.
# Hal1.0/src/camerahardwareinterface.cpp
2.=======
5.hal3/camera3flash.cpp \/This is the point of conflict, before the CameraHardwareInterface.cpp in front of the CameraHardwareInterface.cpp file added
3.hal1.0/src/camerahardwareinterface.cpp
4.>>>>>>> 9fc22d0 ... Bug #534024-[apps_tj][customer needs]
endif here in order to resolve the conflict, we removed 1.2.3.4 Lines and placed 5 at 1 label locations. And then
git Add.
Git commit
This time we will find the following red words, this is because we cherry-pick come over when I, due to conflict, saved history.
================================================
[Tag_product] Common
Conflicts:
Camera.mk
Hal3/camera3hal.cpp
Change-id:i5bef49017323f041857d5498939a9d4d6992d4e0 ================================================
If we don't get rid of conflicts, we'll have the following problem when git push (two Change-id will be available)
Remote: [tag_product] Common
Remote
Remote:change-id:id4c396b9d8d9607af7cd69df76da547e51193ab7
Remote
Remote:conflicts:
Remote
Remote:Camera.mk
Remote:hal3/camera3hal.cpp
Remote
Remote:change-id:i5bef49017323f041857d5498939a9d4d6992d4e0
Delete the word conflicts and git the push so that we can keep the previous change-id without regenerating a change-id.