Published on

Source Code Management

Authors

Source Code Management

For iLMS version 1 and 2 repositories in Azure DevOps, we use a Git repository for managing the source code.

Important Note: DO NOT USE BITBUCKET FOR SOURCE CONTROL AS OF 12/1/2022!

V1 Code Repositories

V2 Code Repositories

Mobile Application Source Code Workflow

For the mobile application, a development branch off of a main branch strategy is used. Then for each feature, a feature branch is created off of the development branch. Because of the use of mobile application stores for deployed mobile releases, this strategy works best. This strategy is based upon the Git-flow git workflow.

In the mobile application source code branching strategy, there are two major branches, main and develop. When a release of a mobile app is to be deployed to the store, the code from the main branch is used. The develop branch is therefore used for the development team to create sub-branches from and then merge those sub-branches when ready to the develop branch.

Git flow with develop branch

Mobile Library Source Code Workflow

Mobile libraries differ from the mobile application project in that they follow the GitHub git workflow. No develop branch is used. See Web API (Backend) Workflow for a more detailed description.

Web App (UI) Source Code Workflow

Coming soon. The team is still deciding on which git workflow to use.

Web API (Backend) Source Code Workflow

The backend web API has different release needs than the Mobile/Web UI projects as it must maintain API specification compatibility at all times. Thus, release deployments and merges tend to be on a feature-by-feature level. This strategy is based somewhat off of the GitHub git workflow.

Feature branch git workflow

Committing Code and Creating Pull Requests

No matter which workflow you are using, follow the procedure below to commit your changes:

  1. Create a new feature branch off of the main or develop branch of the repository with either the name of _pbi/<pbi-number>-<summary-of-changes>_ or _task/<task-number>-<summary-of-changes>_ using git checkout -b <branch name>.
  2. Push your new branch to the "cloud" repository with git push origin -u <branch name>.
  3. Make your changes in the new branch and commit them with git commit -m "summary-of-changes".
  4. Next, checkout the main or develop branch again with git checkout main or git checkout develop.
  5. Then get the latest main/develop branch changes on your PC/Mac/Linux computer with git pull.
  6. Checkout your new branch again with git checkout <branch name>.
  7. Then merge in recent main/develop branch changes with git merge main or git merge develop.
  8. Resolve any merge conflicts in your branch against main/develop.
  9. Add any new merge conflict changes to your branch, repeat step 3 above, then push your changes with git push origin.
  10. Now go to Azure DevOps to the Pull Requests area. You should be notified in your repo of new commits, and it will ask you to create a new Pull Request.
  11. Create a new Pull Request, grab the link, and paste it to the iLMS -- PR Review channel.