Azure Repos | Azure DevOps Server 2019 | TFS 2018 | TFS 2017
Manage the work in your team's Git repo from the Branches view on the web. Customize the view to track the branches you care most about so you can stay on top of changes made by your team.
View your repo's branches by selecting Repos, Branches while viewing your repo on the web.
View your repo's branches by selecting Branches while viewing your repo on the web.
Organize your branches
The default Mine tab on the branches page shows branches you've created, pushed changes to, or set as a favorite, along with the default branch for the repo, such as
master. The All tab lists all branches in the repo, and the Stale tab lists branches in the repo that haven't had any commits in three months or longer.
If you don't see the branch you're looking for and you think it might have been deleted, see Restore a deleted branch.
Filter the listed branches in any of the branch views by entering a specific name or pattern in the Search all branches box in the upper right.
If your team uses a forward slash separator in your branch names, you'll see a collapsible tree view for those branches.
Using a naming convention for your branches is highly recommended. For suggestions on how to name your branches, see Adopt a Git branching strategy.
Add favorite branches
Add branches from the All view to the Mine view by selecting the star icon to favorite the branch. Mark multiple branches as favorites by selecting the star icon on the tree view next to a folder on the tree. Remove favorites by toggling the star off or by selecting the ... to the right of the star to open the branch context menu, then selecting Remove from my favorites.
Review updates to your branches
Each branch name has the name of the last contributor to the branch and a link to the latest commit on the branch. Select the date or time of the last commit to review the updates to the branch. The branch view also shows the number of commits the branch is ahead of and behind the branch labeled Compare. Use this information to quickly check how far a branch has diverged from another.
If the branch has a pull request open, you can see its pull request ID. Select the pull request to open it up so you can review the details.
Change the compare branch
The ahead and behind numbers listed for each branch are in comparison with the branch currently labeled Compare on the Branches page. Update your compare branch to see how far ahead or behind your branches shown on the page are to another branch in your repo:
- Select the ... next to the branch you want to set as the baseline for comparison.
- Select Set as compare branch.
The Compare label will move to this branch and the other branches on the page will have the number of commits ahead/behind updated to reflect the new comparison.
View branch history
Review the files in a branch or history by selecting the ... icon next to the branch name and choosing View files or View history. View files opens up the Files view on the web so you can browse the files based on the most recent commit on the branch. View history shows each commit in the branch history. Select a commit from this history to see the file changes made in that commit.
Change your default branch
This step requires Edit Policies permissions on your Git repo.
Configure your Git repo to use a different default branch to merge code into when your team creates new pull requests.
This is useful when you want to use a branch other than
master for new changes or need to change your main line of development in your repo.
Navigate to your project and select Project settings.
Scroll down and select Repositories from the Code section.
Select the desired repository and expand the branches.
Select the ... beside the desired branch and choose Set as default branch.
Select the settings icon while you have your project open to bring up the project administration page.
Select Version Control.
Select your Git repository. Your branches are displayed under your repo.
Select the ... next to the branch you want to set as default, then select Set as default branch.