LoginSignup
7
6

More than 5 years have passed since last update.

[Emacs] magitでrebase --onto

Last updated at Posted at 2016-09-01

magitでのrebase --ontoがちょっとわかりにくかったのでメモ

magitのバージョンは2.7

rebase_onto1.png

このようなツリーになっていてE-Fをmasterに繋げたいとする。
Fのコミットにいる状態でmagitに入ってrでrebaseモードに入る。

rebase_onto2.png

ここでe(elsewhere)ではなくs(subset)を選択。

ミニバッファにつなげる先(ここではmaster)を入力。

rebase_onto4.png

以下の画面となるので移動する先頭(ここではE)を選択しC-c C-c

rebase_onto3.png

コンフリクト等が起きた場合は通常のrebaseと同じように処理して、最終的に求めていた形となった。

rebase_onto5.png

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