$ ./guess_the_languageGit
Git · hard · #23

Which commits are replayed onto main?

$ git log --oneline --graph --all
* 3b3e5e3 (main) M
| * da35f8b (fb) B2
| * 49f668f B1
| * 751c04f (fa) A1
|/
* 52327c5 A
$ git rebase --onto main fa fb
  1. Only B1 and B2
  2. A1, B1 and B2
  3. Only B2
  4. Only A1
--onto main fa fb takes the commits in fb that are not in fa and replays them on main. A1 stays behind on fa.
Play Git ▸