0

I have 2 branches, for example branch A and B and enter the command

git rebase A B

Then conflicts occur and use

git mergetool

and have meld for mergetool.

Now Meld opens with 3 panes, left, center and right. I don't exactly understand what is displayed in each pane. I have found similar resources but not for rebasing. And also after having finished with the merge what is my goal :

  1. To make the center pane as I want it now
  2. Too make the center pane as it should be if the commit was applied to the new branch A.
Andreas Oikonomou
  • 3,257
  • 2
  • 13
  • 13

1 Answers1

0

Left panel is the file as it is in branch A of your example
Right panel is the file as it is in branch B of your example
Central panel is "merge" result where you can choose, from left, right, or editing directly, what to keep.

DonCallisto
  • 29,419
  • 9
  • 72
  • 100
  • If left panel is branch A then it should not change, while in my case as I go on with the procedure of rebasing and the same files show up many times for various commits, the left pane is changing. – Andreas Oikonomou Oct 17 '17 at 07:36
  • @AndreasOikonomou that's because rebasing will apply "n" commit below your current branch ones (or if you prefer, it will apply all your commit on top of the base branch ones). So, each time a commit is placed on top, if conflicts are present, it will show you the n-th version of the file you have committed. For instance, let's say you have `foo` file committed seven times in your branch. When you perform rebase, potentially, you will be requested to resolve conflicts of your `foo` file up to seven times as `foo` file has seven version (a version for each commit) – DonCallisto Oct 17 '17 at 07:40
  • So left pane is branch A with each commit applied to it and right pane is branch B with each commit applied to it? – Andreas Oikonomou Oct 17 '17 at 07:54
  • @AndreasOikonomou left panel is a file in your branch `A` at a certain commit application whereas right panel is the same file in your branch `B` at the "same point" – DonCallisto Oct 17 '17 at 07:57
  • And when deciding what to keep in the middle file should I keep what I want in the final version or how the file should be at the certain commit if it were to be applied on branch A? – Andreas Oikonomou Oct 17 '17 at 08:10
  • @AndreasOikonomou you won't know: the central could be the final version but if other commits will collide with that version, again, you'll be prompted to tackle them. – DonCallisto Oct 17 '17 at 08:25