1
0

Git:常用技巧

This commit is contained in:
周中平 2022-11-17 14:04:19 +08:00
parent be6f91f53b
commit b959c752e0
No known key found for this signature in database
GPG Key ID: B1DF9DD42D8E00DC
2 changed files with 10 additions and 9 deletions

View File

@ -1,12 +1,3 @@
<!--
* @Author: 7Wate zhouzhongping@7wate.com
* @Date: 2022-06-16 10:28:00
* @LastEditors: 7Wate zhouzhongping@7wate.com
* @LastEditTime: 2022-11-16 16:52:31
* @Description:
*
* Copyright (c) 2022 by 7Wate zhouzhongping@7wate.com, All Rights Reserved.
-->
--- ---
slug: / slug: /
sidebar_position: 1 sidebar_position: 1

View File

@ -152,3 +152,13 @@ git config --global commit.gpgsign true
5. 验证签名 5. 验证签名
最后可以推送签名提交到 git 托管平台,验证是否签名成功! 最后可以推送签名提交到 git 托管平台,验证是否签名成功!
## 压缩提交记录
如果在新分支进行了多次提交,然后想合并到主分支。可以使用 --squash 选项,压缩合并提交。
```shell
// 将目标分支的提交压缩为一个,然后合并分支
git merge --squash <branchName>
```