From b959c752e0ae233273cbac8eb2b16c3728422967 Mon Sep 17 00:00:00 2001 From: 7Wate Date: Thu, 17 Nov 2022 14:04:19 +0800 Subject: [PATCH] =?UTF-8?q?Git=EF=BC=9A=E5=B8=B8=E7=94=A8=E6=8A=80?= =?UTF-8?q?=E5=B7=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group/organization/home.md | 9 --------- wiki/getting-started/Git/进阶/常用技巧.md | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/group/organization/home.md b/group/organization/home.md index 4eb61111..ebee7bd7 100644 --- a/group/organization/home.md +++ b/group/organization/home.md @@ -1,12 +1,3 @@ - --- slug: / sidebar_position: 1 diff --git a/wiki/getting-started/Git/进阶/常用技巧.md b/wiki/getting-started/Git/进阶/常用技巧.md index b908923b..41e75be6 100644 --- a/wiki/getting-started/Git/进阶/常用技巧.md +++ b/wiki/getting-started/Git/进阶/常用技巧.md @@ -152,3 +152,13 @@ git config --global commit.gpgsign true 5. 验证签名 最后可以推送签名提交到 git 托管平台,验证是否签名成功! + +## 压缩提交记录 + +如果在新分支进行了多次提交,然后想合并到主分支。可以使用 --squash 选项,压缩合并提交。 + +```shell +// 将目标分支的提交压缩为一个,然后合并分支 +git merge --squash +``` +