Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To make changes to the code, follow these steps:

Table of Contents

Clone the repository

  1. Open Azure DevOps.

  2. Select Repos and choose the repository using the dropdown menu in the top bar.

  3. Click Clone.

  4. Copy the link that is shown.

  5. Open Visual Studio and select “Clone a repository”.

  6. Paste the link copied in step 4, into the “Repository location” field.

  7. Click Clone.

Create feature branch

Info

If you have already made all your code changes locally while on the dev branch but have not yet committed anything, you can still follow the steps below to create your feature branch. You may need to stash your changes before you do the pull, and when unstashing, you may need to resolve merge conflicts.

  1. Make sure you are on the dev branch and then do a pull (to ensure you have the latest code).

  2. Click on the branch dropdown then click New Branch.

  3. Name the branch as follows: feature/PbiNumber-PbiTitle. To be safe, ensure that the new branch is based off of origin/dev (i.e. the remote dev branch, to ensure you have all the latest changes that are in dev).

  4. The bottom-right corner should now show the name of your branch. If not, switch to your feature branch.

Expand
titleAlternatively, you can choose to create the branch from DevOps
  1. Open Azure DevOps.

  2. Go to Repos > Branches > New Branch.

  3. Add a name, select your work item and click on create

    The standard for branch’s name

    Create.

    • Branch naming convention: feature/PbiNumber-PbiTitle

      Image Modified

Make your code changes (then commit & push)

  1. You can now make all your changes for the PBI/Bug.

  2. To view the changes you have made since your last commit, open the “Git Changes” window or click on the pencil icon in the bottom menu bar.

  3. To ensure that changes are not lost if your computer breaks down or if you have to take sudden leave, please make sure to commit and push your changes to the remote server at the end of each day (even if changes are unfinished).

    • You can check what changes were made to each file by double-clicking on the files in the list.

    • If there is a * beside the file name, this indicates that it has not been saved & the change will not be committed. Sometimes there are no changes and you just need to double-click on the file for it to disappear from the list.

    • If you only wish to commit some of the files, you can stage them by right-clicking on the file and selecting “Stage”.

    • Select “Commit All and Push” in order to commit your changes locally then push to DevOps.

  4. Once all your changes have been pushed to the remote server, there should be a 0 beside both icons in the bottom bar.

Create a pull request

Once you have finished making all your changes and have pushed them all to the remote feature branch in DevOps, you must now create a pull request to merge the changes into the dev branch.

...