Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

how to read git graph in bitbucket commit history

Mohit Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Nov 20, 2023

Hi, I would like to understand how to read and interpret a git graph. See for example the following image. I have the following questions: 

1. Does color have any meaning here like green is for master, red for develop etc etc or are they just there to ease readability?

2. Does the line on leftmost (in this case green one) represent the branch I have selected from thee dropdown menu? 

Screenshot 2023-11-21 at 11.47.36 AM.png

2 answers

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 21, 2023

Hello @Mohit Sharma ,and welcome to the Community!

For your first questions about the colors, bitbucket walks through the list of commits in the repository and draws colors in this order: Green, Red, Blue, Teal, Yellow, Purple.

The branch with the most recent commit will start with green, and then it draws from there in commit order.

Based on that, for your second question, when you filter the commit list by a branch, only commits reachable from that branch will be presented, so the green line (the first color that is used to draw) will represent the commit parent history for the selected branch. Other colors will represent other branches.

You can also find further details on how the commit-graph is handled in this answer to a similar question.

Thank you, @Mohit Sharma !

Patrik S

Hi there.

Git graph colors are typically used for readability, but they can convey information in some cases. To find out, check the graph legend or project documentation. Usually, master is shown in different colors, but it's project-specific.

The leftmost line usually represents the currently checked-out branch. To confirm, look for an asterisk (*) beside the branch name in the terminal or use the 'git branch' command.

Hope this helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events