locked
How to interpret Git history graph for a branch? RRS feed

  • Question

  • I am not new to Git or Visual Studio, but I can't seem to come to grips with the history view of a branch as seen in VS 2019.
    Anyone care to point me to the docs where the graph is explained? Especially the different lines when they fork etc.

    For example, I have a branch that when I view the history, I can't really tell at what point it was created from the master branch. I'm trying to see just the commits made since the branch was created.  The "graph" line(s) next to the commits all form a single line with dots as shown below.  Now, how can I tell by looking at this when the branch was created off master (or any other branch for that matter) ? Some of these commits are the result of "catch up" merges from master.  I'm not even sure if im asking the right question...

    my branch history


    eg.  https://devblogs.microsoft.com/devops/announcing-git-graph-and-advanced-filters-to-visualize-commit-history/

    regarding the history graph further down the page in the above example, why are there multiple grey lines and which is which?

    Ok, here is what I think im confused on.  See this image, taken from here
    https://azuredevopslabs.com/labs/azuredevops/git/

    Toward the bottom of the graph, why would dc364758 have two commit ancestors?, eg. 

    9b6c82bf and 78be87b0


    • Edited by shiftbit Friday, August 14, 2020 1:31 AM fghfgh
    Thursday, August 13, 2020 8:00 PM

Answers

  • Hi shiftbit,

    >>The "graph" line(s) next to the commits all form a single line with dots as shown below.  

    The single line means that there are not other branches in your mainline branch.

    >>Now, how can I tell by looking at this when the branch was created off master (or any other branch for that matter) ? Regarding the history graph further down the page in the above example, why are there multiple grey lines and which is which?

    One commit with two lines means that two branches are merged, which is like this:

    You could refer to more details here: Understand Git history

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by shiftbit Friday, August 14, 2020 12:46 PM
    Friday, August 14, 2020 5:23 AM