Step 1 - Configuring branch policies in Azure Repos Check out part 1 of this blog series, you'll be using the Azure DevOps Project and Repo created in Step 5. Please leave as VSCode for this guide, you can reinstall later to pick a different IDE.Īn Azure DevOps Project. This allows you to launch VSCode as the default code editor or difference tool, straight from git on the command line. If you installed VSCode before Git, you will also be presented with this option: If you are using Windows, ensure the box is checked to Enable Git Credential Manager. The workflow above enables this.īefore working through this guide you will need the following:Īn Azure Subscription, you can create a free account.Īn Azure DevOps Organisation, the basic plan starts with the first five users for free.Ī local installation of Visual Studio Code (VSCode)Ī local installation of Git, following the install guide for your OS. Your master branch needs these qualities so that feature branches created by your team start from a known good version of code. The code in your master branch should pass tests, build cleanly, and always be current. This workflow is often called the Feature Branch Workflow or Topic Branch Workflow. Once the code changes and history are merged, it's good housekeeping to delete the branch. The pull request is completed and the changes are merged into the main code line - the master branch.ĭelete the branch. The team members who are required to review your changes agree that the criteria for changes have been met. The criteria for checks of these changes will often be laid out in a code review checklist which are likely to include the coding standards of your team or organisation.Ĭomplete the pull request. One or more team members perform a quality check on the code. Push your changes to the remote repository, in the case of this guide, Azure DevOps.Ĭreate a Pull request so that one or more people on your team can review your changes. You can keep track of your commit history locally while you work. A branch would typically be for a new feature or a defect fix.Ĭommit changes to your branch locally. A branch is an isolated version of the code that you can work on offline without impacting other developers on your team. A common Git workflow for a team has the following steps:Ĭreate a branch for the changes you are going to make. What happens when other developers need to make changes, at the same time as you, and in the same repository? How do you ensure the changes follow your coding standards and are of sufficient quality? This is where implementing a git workflow is crucial, to ensure changes are reviewed and merged back into the main code line. Stepping back to part 1 of this guide you've been a lone developer, cloning your repository, making changes locally and pushing them back up to your remote. Working with the Feature Branch Workflow and Pull Requests
0 Comments
Leave a Reply. |