---
title: "GIT合并某次提交"
author: "xuxujing"
date: "2021-07-13T11:03:02Z"
tags: []
categories: ["开源软件"]
slug: "git"
draft: false
lastmod: "2021-07-13T11:11:12Z"
id: 2520430
url: "https://xujava.iteye.com/blog/2520430"
---

只合并某次提交：

语法 git  cherry-pick commitid

步骤：

1\. 打开git bash

2\. 输入git log查看提交日志(q退出)，复制commitid，如aabbcc

3\. 查看所有分支：git branch -a

4\. 查看当前分支：git branch

5\. 切换分支：git checkout release

6\. 查看当前分支是否切换成功：git branch

7\. 合并某次提交：git cherry-pick aabbcc

8\. 推送：git push

9\. 切换分支到原分支：git checkout develop

10.查看当前分支：git branch