有两处特别要注意的,都以红色标出。
源码库
柳鲲鹏 / FreeType · GitLab
本地查看提交日志
$ git log --pretty=oneline 6a91471c40defbbf936d97ee7f844d8b884db11f (HEAD -> master, origin/master, origin/HEAD) Add a bridge macro for float a385220e59771406bd18daaa63d6849576768af9 Merge remote-tracking branch 'upstream/master' 57a419c42eb30a9c8e06e1151fe495cb5483d8f5 Remove float type, change to FT_Fixed 3ce73ca1fc7469e5f39ab21a262bfdafdf9e84b1 Werner Lemberg told me make sure use FT_EXPORT_DEF 2e669896610d3624502362fc5e9a6cb436792024 Werner Lemberg told me check white space formatting. I fixed it 5182264a40e70ff31be0a0ec8a0d5ffb5f65582e [cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`. 0d66abca4b0df394c1e423040bcb1bedcca878b9 Synchronize `ftoption.h` flavours. 141d979af74e09bd01f6956b5cc8dfa73047c779 Minor comment changes. c0b91c6a77f67258d56d153c03adfd4b43cb39dd Add a api, someone can oblique by any value 15f687349528fb0d7cba1ee7a8becf0af29116ec Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name. 0417527d5b5abc3ee9426f31bd95209ca97502a5 [autofit] Reset the face charmap directly. 1b6dce84f946fd784bf0882c8f6e20dc04a3110a * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
其中,忽略2(合并操作),1/3/4/5/9是吾修改的,想合并到9。因为是跟别人合作的,所以不能使用HEAD~9。
网页察看提交情况
开始合并到最初的提交
git rebase -i 15f68734
注意,想合并到目标提交(ID=c0b91c6a),必须使用目标之前的那个提交(ID=15f68734)。
弹出要合并提交的界面:
修改要合并的提交
注意,这里把几个无关的提交(别人的)删除了。
pick:使用提交
s(squash):使用提交,但融合到前一个提交
一次wq
修改注释
二次wq
$ git rebase -i 15f68734 [detached HEAD 070ca99a6] Add a api and two macros, someone can oblique by any value Date: Mon Oct 10 10:57:10 2022 +0800 2 files changed, 30 insertions(+), 4 deletions(-) Successfully rebased and updated refs/heads/master.
再次查看提交日志
$ git log --pretty=oneline 070ca99a6c85ca3dd24bca44eed80ae4248ee7f2 (HEAD -> master) Add a api and two macros, someone can oblique by any value 15f687349528fb0d7cba1ee7a8becf0af29116ec Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name. 0417527d5b5abc3ee9426f31bd95209ca97502a5 [autofit] Reset the face charmap directly. 1b6dce84f946fd784bf0882c8f6e20dc04a3110a * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
可以看到完全达到了目标。
提交修改到远程仓库
$ git push -f warning: redirecting to https://gitlab.freedesktop.org/quantum6/freetype.git/ Enumerating objects: 15, done. Counting objects: 100% (15/15), done. Delta compression using up to 8 threads Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 1.22 KiB | 1.22 MiB/s, done. Total 8 (delta 6), reused 0 (delta 0), pack-reused 0 To https://gitlab.freedesktop.org/quantum6/freetype + 6a91471c4...070ca99a6 master -> master (forced update)
再次网页察看提交情况