LoginSignup
1
1

More than 5 years have passed since last update.

対話的 rebase でどのコミットを fixup すればいいか調べるスクリプト書いた

Last updated at Posted at 2015-04-01

ブツはこれ → https://github.com/magicant/settings/blob/master/bin/git-retro

ユースケース

git commit --fixup=XXXXXXXX に指定すべきコミットが何か自分で見付け出すのが面倒な時

使用法

  1. 適当なコミットメッセージで一旦パッチをコミットする: git commit -m temp
  2. Rebase 先を指定してスクリプトを実行する: git retro master
  3. 123ABC is the first applicable commit みたいなメッセージが出るので、それを対象に fixup する: git commit --amend --fixup=123ABC && git rebase -i master

何をやってるの?

Rebase 対象の中から、コンフリクトなしでパッチを当てられる最も古いコミットを探します。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1