终端上的Git Squash
原文英文,约300词,阅读约需2分钟。发表于: 。This week for lab 5, we were supposed to refactor the open source project that we have been working with. After a lot of contributions from others students, the code base was expanded and it was...
本周的任务是重构一个开源项目。由于多次学生贡献,代码库需要重构。我通过创建函数、优化变量名、将逻辑分离到不同文件来完成重构。具体包括将TOML文件解析逻辑提取为函数,更新变量名,并将参数解析逻辑移至新文件。完成后,我使用git rebase将多个提交压缩为一个并合并到主分支。这次实验让我学会了如何在本地压缩提交。