ブツはこれ → https://github.com/magicant/settings/blob/master/bin/git-retro
ユースケース
git commit --fixup=XXXX
の XXXX
に指定すべきコミットが何か自分で見付け出すのが面倒な時
使用法
- 適当なコミットメッセージで一旦パッチをコミットする:
git commit -m temp
- Rebase 先を指定してスクリプトを実行する:
git retro master
-
123ABC is the first applicable commit
みたいなメッセージが出るので、それを対象に fixup する:git commit --amend --fixup=123ABC && git rebase -i master
何をやってるの?
Rebase 対象の中から、コンフリクトなしでパッチを当てられる最も古いコミットを探します。