Closed kampiamodikuesto closed 1 year ago
What do you mean by color? The particular color of branches doesn't have any effect on passing the level, its just a visual aid
i know that colors are aid but i think that they doesn't work as do you write on the text.
In particular i can't understand why when we are in "main" and merge "newImage" (or "bugFix") then "newImage" change color and take the same of the common parent commit.
Oh so every commit has a "blended" color of all its parent branches. So C12 becomes the blend of the newImage and main colors once the merge happens, so it has the same color as C10
C11 and C13 are only downstream of main, so they take on the main color
i'm sorry if i continue to ask. "the blend of the newImage and main color once the marge happens" shouldn't to be applied to C13? shouldn't all be orange execept C12 that should remain green? And all become orange after "git merge main"?
i make a visual summary image to be more clear https://snipboard.io/ZeYu2c.jpg More about "branch", why color change an all elements (also parent node) in the beginning when we execute a branch? maybe because after he creation of newImage branch, orange is the result of yellow (newImage branch) and fuchsia (main branch) that we can see after the first and second commit?.
because after he creation of newImage branch, orange is the result of yellow (newImage branch) and fuchsia (main branch) that we can see after the first and second commit?.
yes thats exactly right -- we get a new branch, which has a new color (yellow), so C0 and C1 now get a blended color between main and newImage
The blended color should not apply to C13 once the merge happens, because C13 is only downstream of main
. It is not downstream of newImage
-- its actually the opposite (newImage is downstream of C13).
The "blended" only goes in one direction, upwards in the tree diagram (aka child descendants, or downstream).
Anyways from all your screenshots this is working exactly as how I would expect, albeit I understand its a little confusing and never explained explicitly anywhere
hi, i have notice that something doesn't work with color on second and third part (branch and merge). Colors don't seem to change in according on what text says. This are commands to reproduce the issue:
git branch bugFix
git commit
git checkout bugFix
no color changes,git commit
,git checkout bugFix
Commands are necessary to create the initial situation of repo in the third chapter and no color changes happen.git merge bugFix
If we execute this command into the sandbox we get a different "color" results.