Visual Studio now allows a seamless way to switch Git Repositories and Git Branches. During the development, we often switch git repositories to push code and also change branches. Using Git Repository Picker, you can switch to any repository using a single click. Also, the Git Branch Picker allows us to select the branches in more effective ways. It also allows us to switch between remote and local branches. Overall, these new features will enable the developer to access git repositories and branches easily. Moreover, they increase the developer’s productivity.
Switch Git repositories – Repository Picker
Firstly, To start making it easier to switch between git repositories, you will find the repository selection button in the Status bar. You can access the repository picker from there.
Secondly, Once you select it, you can see all of your local repositories listed in alphabetical order. You can now just select any of the repositories to switch. When you have several repositories, you can filter the list as well.
Related Tip : How to view the list of all local Git Repositories in Visual Studio?
Finally, You can remove any of the item by right click and selecting “Remove from List“
Switching between Branches – Git Branch Picker
Similar to Switch Git repositories, Visual Studio has now enhanced experiences for switching between branches. Git Branch picker allows us easily check out any local or remote branch by just using a single click.
The “Create new branch” has the same experiences as the branch picker, where you can easily switch between local or remote branches and pick up the base branch to create a new branch.
Related Tip: CI/CD using GitHub Actions Workflow directly from Visual Studio
Both the experiences for branch picker support filter. So for a large number of branches, you can filter them by just searching specific items.
“Manage Branches” available under the Git menu option bring the current select branch and repository as per the context set for the solution.
You can easily search branches. The “Manage Branches” window is context-sensitive. , If you switch the branch or repository, the “Manage Branches” context for the repository and branch will change automatically.
Overall, Switch Git repositories and branches seamlessly in Visual Studio is a great addition and will increase developer productivity.
Read : Azure DevOps in the Era of Digital Transformation
Pingback: Dew Drop – June 3, 2021 (#3457) – Morning Dew by Alvin Ashcraft
Pingback: Dew Drop – June 3, 2021 (#3457) - Software Mile.com
Pingback: Control Auto Solution load with Git Repository Open in Visual Studio - Daily .NET Tips
Pingback: Git Pull Request Deep Links in Visual Studio - Daily .NET Tips