Git Interactive rebase - order to commit and to select / squash

Let's say I have the following:

pick b0bc3ea Issue #1431 - Part 1
pick 606e9bc Issue #1431 - Part 2

      

Part 2 is obviously the last commit. Does it matter which direction I dig it? Do I need to twist old into new, newer and older, or does it matter?

Thank!

+3


source to share


1 answer


To combine these two commits, use the following:

pick b0bc3ea Issue #1431 - Part 1
s 606e9bc Issue #1431 - Part 2

      



The rebase file is processed in order, and the command s

outputs the characters that were committed in the previous commit (and gives you the ability to edit the commit message).

If you tried to make the first commit s

, then it will try to align that into a commit before that. If you changed the order and took part 2 first, and tried to cut out part 1, you are likely to run into merge conflicts.

+3


source







All Articles