How to set up working environment and make code changes for ROFS

Highlighting the process of how to implement a code change, going over git changes, pull request, and code reviews.

Set up working environment

  1. Download Visual Studio 2022 from the following network directory: \ncrdb102\Transfers\Software\Visual Studio\Visual Studio 2022

    1. When installing make sure to select the following workloads when prompted

  2. Once VS is installed open and choose Clone a repository

  3. In the Clone a repository screen, choose a local path for the repo, and for the Repository location field enter https://transport-canada@dev.azure.com/transport-canada/DSD-RAIL-ROFS/_git/DSD-RAIL-ROFS , then click clone.

Making a code change

  1. From Azure DevOps navigate to the Branches section under Repos, and click New branch

  2. Create branch from development with the format YourFirstName-BreifSummaryOrTicketNumber

  3. Go to Visual Studio, under the Git Changes view look for your new branch under the Remotes section, and switch to it. Note: You will have to perform a git fetch in order to see your branch initially.

  4. Once you are done making your changes, go to the Git Changes view, enter a message, and click Commit All. Once committed locally click the upward arrow icon to push to DevOps

     

  5. In DevOps, go the pull requests menu and create a new pull request for your changes into the development branch . Make sure to link your work items and add other developers as code reviewers.

     

  6. Your code will now be reviewed by other developers, once the process in done and all checks have completed, click Complete.