LoginSignup
0
0

More than 3 years have passed since last update.

git rebase -i を利用してコミットをまとめる

Posted at

作業の前に

万一に失敗したときのため、ローカルにバックアップをとるなどリスクヘッジをしておくと安心です。

作業手順: checkout→log→rebase

まとめる対象のブランチにチェックアウト

$ git checkout branch_name

コミットログから「まとめる対象の一つ前のコミットID」を取得する

$ git log

* commit ffc5767e557a84faea786a17d1f3d23ac10e330c
| Author: hoge <hoge@example.com>
| Date:   Fri Sep 18 04:08:27 2020 +0000

rebaseしてコミットをまとめる

$ git rebase -i ffc5767e557a84faea786a17d1f3d23ac10e330c

参考

0
0
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
0
0