Git 合并指定 Commit到分支

操作如下:

 git branch -a
# 从远程拉取分支,注意:一般是从本地分支拉取
git checkout -b illegal_get_user origin/hotfix/illegal_get_user
git checkout -b hotfix/illegal_get_user
git status
git branch -a
git log
# 检取相应CommitID的代码到当前分支
git cherry-pick a56a07d0af16f8f4b6844afaa91ae91eb665b97f
git status
git commit -m "踢出用户合并"
git commit --allow-empty
git status
git log
git pull; git push
git branch -a
# 设置推送到远程的路径
git branch --set-upstream-to=origin/hotfix/illegal_get_user hotfix/illegal_get_user
git status
git pull ;git push
# 可能会有冲突,要解决
git checkout -- application/api/controller/v1/Index.php
git checkout -- composer.json