私は解決策を見つけました:
rebase --interactive は、最初のコミットの前にコミットのハッシュをスカッシュに渡すと、ジョブを実行します。
git rebase -i --no-autosquash "<hash of comitt BEFORE FeatureX>"
これにより、次のようなテキストファイルが開きます
pick 07b952c some unrelated committ
pick 6c46e25 FeatureX
pick b4bc625 B
pick f2fab98 C
pick dc6ba8b D
pick 5633408 FixBugInFeatureX
pick 077888f E
pick 0123445 F
# Rebase xxx..yyy onto zzz
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
このファイルを次のように変更できるようになりました
pick 07b952c some unrelated committ
pick 6c46e25 FeatureX
squash 5633408 FixBugInFeatureX
pick b4bc625 B
pick f2fab98 C
pick dc6ba8b D
pick 077888f E
pick 0123445 F
そして、git は両方のコミットをまとめて押しつぶします。その後、編集可能なテキスト ファイルが表示され、ここで 6c46e25 の新しいコミット メッセージを編集できます。これには 5633408 も含まれています。
マージまたはプッシュ/プルが両方のコミット間で行われた場合、これは満足のいく動作をしません。これにより、少なくとも私の試験では履歴が重複しました。しかし、これに加えて、まさに私が欲しかったものです。重複した履歴はありません。明らかにポイントは、編集する最初のコミットの前にコミットのハッシュを渡すことです。