如何使用给定的提交消息进行git压缩提交
我有几个“保存点”提交,希望将它们压缩成更具可读性的时间线。以下是我的情况:如何使用给定的提交消息进行git压缩提交,git,Git,我有几个“保存点”提交,希望将它们压缩成更具可读性的时间线。以下是我的情况: > git log 29a94be3d2d4f Added some feature 9bf0f2730234e savepoint << Pushed here 240e1ce8893e9 Add ignore rule 01462e889d416 savepoint 6238e3b775027 Fixed Something << Pushed here 0
> git log
29a94be3d2d4f Added some feature
9bf0f2730234e savepoint << Pushed here
240e1ce8893e9 Add ignore rule
01462e889d416 savepoint
6238e3b775027 Fixed Something << Pushed here
0d485486a42a9 Update Version
......
06ad9e4fc5f64 savepoint
1462e57657434 Initial Commit
有没有一种方法来编写这个脚本,所以我可以说:
git squash-COMMIT with log=“savepoint”~ FROM_INITIAL_COMMIT
更新:技巧似乎在git_SEQUENCE_编辑器中
variable更新:技巧似乎在git_SEQUENCE_编辑器中
variable你的让我想起了什么,但它并不完全适用于您的情况。您的让我想起了什么,但它并不完全适用于您的情况。对此进行扩展,是一个冗长的答案,它使用GIT\u SEQUENCE\u EDITOR
自动使用GIT rebase-i
挤压类似的提交。要扩展它,是一个很长的答案,它使用GIT_SEQUENCE_EDITOR
自动使用GIT-rebase-i
压缩类似的提交。
29a94be3d2d4f Added some feature
240e1ce8893e9 Add ignore rule
6238e3b775027 Fixed Something
0d485486a42a9 Update Version
1462e57657434 Initial Commit