oh-my-git/levels/top-down/rebase

21 lines
494 B
Text
Raw Normal View History

2020-09-30 22:20:42 +02:00
description = Rebase all branches on top of the main branch, so that the commits are in alphabetical order, and then point the main branch to the top commit.
[setup]
2020-09-22 19:43:02 +02:00
git commit --allow-empty -m A
git commit --allow-empty -m B
git commit --allow-empty -m C
git switch -c side1 main~1
git commit --allow-empty -m D
git commit --allow-empty -m E
git switch -c side2 main~2
git commit --allow-empty -m F
git checkout main
2020-09-30 22:20:42 +02:00
[win]
diff <(git log --pretty=%s main) <(echo -e "F\nE\nD\nC\nB\nA")