Git Branch Tracking Explained in TeamTrace

Created by TeamTrace Support, Modified on Tue, 24 Nov at 6:15 AM by TeamTrace Support

Overview

When a developer works on a ticket, they usually do it on their own branch in the code repository. With Git integration, TeamTrace shows those branches on the ticket, so anyone can see that work on the ticket has started and where it is. This article explains what a branch is, how TeamTrace tracks branches, how to make sure a branch is linked to the right ticket, and what to check when a branch doesn't appear.


Before You Begin


What Is a Branch?

A repository holds the project's code. A branch is a separate copy of that code where a developer can make changes safely, without affecting the main version that everyone else uses. When the work is finished and checked, the branch is merged back into the main code.

A simple way to picture it: the main code is the published document, and a branch is a draft copy that one person edits. Only after review does the draft replace the published version.


What Branch Tracking Means

Branch tracking is TeamTrace keeping a record of the branches that belong to each ticket. It answers questions such as:

  • Has work on this ticket started?
  • Which branch is the work on?
  • Who created it, and when?
  • Has it been merged?


How Branch Tracking Works

  1. Create a ticket in the connected TeamTrace project, and copy its ticket number.
  2. Create a branch in the repository, using the ticket number. See Name a Branch below.
  3. Commit changes on that branch.
  4. Open the ticket in TeamTrace and click the Git section.
  5. Click the Branches tab. The branch is listed there.


Name a Branch

The ticket number is what ties a branch to a ticket, so use it when you create the branch. Always check that the number you use is the one on the ticket.

RuleDetails
Where the number goes[Add: whether the ticket number must be in the branch name, and where in the name.]
Format[Add: the format of the ticket number, for example the project code and a number such as REN-185.]
Capital letters and separators[Add: whether capitals, hyphens and slashes matter.]
Example[Add: a real example of a good branch name.]


Habits that help, whatever the rule:

  • Create the ticket first, then the branch.
  • Use one branch per ticket where you can, so the link is clear.
  • Add a few words after the number that say what the branch is for, so people can read the list.
  • Agree on one naming habit with your whole team.


What You See in the Branches Tab

ItemWhat it shows
Branch name[Add: the name of the branch, and whether it is a link to the branch in the Git service.]
Created by[Add: the person who created it.]
Date[Add: when it was created or last updated.]
Status[Add: for example open or merged, if TeamTrace shows it.]
Repository[Add: which repository the branch is in.]


From Branch to Merge: the Life of a Branch

The Branches tab is one of three tabs in the ticket's Git section. Together they follow the work from start to finish.

StageWhat happens in GitWhere you see it in TeamTrace
1. Work startsA branch is created for the ticket.Branches tab
2. Work is savedThe developer commits changes to the branch.Commits tab
3. Work is reviewedA pull request asks for the branch to be reviewed and merged.Pull request tab
4. Work is mergedThe branch is merged into the main code.Pull request tab [Add: confirm how a merge is shown.]


Examples of What Branch Tracking Tells You

What you seeWhat it usually means
A ticket with no branchWork hasn't started in Git, or the branch isn't linked to the ticket.
A branch with no commitsThe branch was created, but no changes have been saved to it yet.
A branch with commits but no pull requestWork is in progress and has not yet been sent for review.
More than one branch on a ticketThe work was split, or a new branch was started. Check with the developer.

These are general readings. Confirm them with your team, because every team works a little differently.


Tips

  • Branch from the ticket. Copy the ticket number straight from TeamTrace, so you don't mistype it.
  • Keep branches short-lived. Merge them soon after the work is done, so the list stays easy to read.
  • Check the Branches tab early. After you create a branch, look at the ticket to confirm that the link works before you do a lot of work.
  • Use the three tabs together. A branch with commits and a pull request tells you far more than a branch alone.
  • Fix a wrong name early. It is easier to rename a new branch than to untangle one with many commits.


Notes


Troubleshooting

ProblemWhat to check
My branch doesn't appear on the ticketCheck that the branch is in the connected repository and that its name uses the correct ticket number. Refresh the ticket page. 
The branch appears on the wrong ticketCheck the ticket number in the branch name. Rename the branch with the right number.
The ticket has no Git sectionCheck that the project is connected under Settings, Integration.
The Branches tab is emptyNo branch is linked to this ticket yet. Create one with the ticket number, or check that the branch has been pushed to the repository.
A branch is missing after I renamed or deleted it[Add: how TeamTrace handles renamed and deleted branches.]
Branches stopped appearingCheck that the TeamTrace app is still installed and authorized in your Git account. If not, connect the project again.
I tried everything and it still failsContact TeamTrace support. Email us at support@teamtrace.app 


Related Articles

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article