LoginSignup
0
0

More than 1 year has passed since last update.

Git | fixup / squash in reverse order with $ git rebase --interactive

Last updated at Posted at 2019-04-15

problem

A story about rebasing in interactive mode.

For example, if you have a commit like this:

 pick 77335c9 Commit A pick d850545 Commit B 

I don't want to dissolve B in A.

 Commit A ⇡ Commit B 

I want to dissolve A into B.

 Commit A ↓ Commit B 

Solution

At that time, first replace the text up and down.

 pick d850545 Commit B pick 77335c9 Commit A 

Next, specify fixup (or squash).

 pick 77335c9 Commit A f d850545 Commit B 

environment

  • git version 2.7.4 (Apple Git-66)

Original by

Git | $ git rebase --interactive で 逆順に fixup / squash する

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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