简体   繁体   中英

What is the meaning of colored lines in commit graphs drawn by Eclipse?

I'm trying to understand some parts of the GIT graph in Eclipse.

We'll refer to commiters as G, A, R, J and K.

In this case, we have two branches : master, and agfa (dev branch). Commit 5cc4355 : What does the green line means? It's not a new branch, so I guess it means the local repository has diverged... somehow. Commit 9d4035d : Here, "A" merged the agfa branch to the master. But why is the merge on the yellow line, instead of the actual master? (blue).

I guess I'm just confused by the fact that simultaneous developpers works on different workspace... but if someone could confirm what's happening, that would be very helpful :)

Eclipse links related commits with colored lines to help you read the commit graph, but those colored lines have little to do with branches (in the Git sense).

The Git terminology is a bit confusing, but remember that a branch is nothing more than a reference that points to a particular commit at a given time .

You shouldn't conflate Git branches and whatever your IDE uses to represent a sequence of related commits.

Commit 5cc4355 : What does the green line means? It's not a new branch, so I guess it means the local repository has diverged... somehow.

Note that two lines (blue and green) stem from commit 5cc4335 . This indicates a divergence in history: two different branches were originally pointing at that commit, but then different things happened in those two branches (ie different commits were created on those two branches), hence the divergence at that node of the commit graph.

Here, "A" merged the agfa branch to the master. But why is the merge on the yellow line, instead of the actual master? (blue).

That commit message indicates that, when contributor A merged branch agfa into master , master was pointing at commit 9d4035d . The color of the line (yellow) is irrelevant.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM