9
10

More than 5 years have passed since last update.

うっかり手元で色々変えてしまった変更を、こう、サクッと、「過去の」コミットにamendしたい

Posted at

大した手順ではないのだが:

$ git stash
$ git rebase -i HEAD~3
# ここで、混ぜ込みたい対象のコミットを「edit」にしておく
$ git stash pop
$ git commit --amend
$ git rebase --continue

こんな感じが一番サクっと感が高い……のか?

9
10
4

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
9
10