Developer WorkFlow - TeamHaircut/CAH GitHub Wiki
Use this developer workflow for any assigned issued.
During the sprint planning process, developers will be assigned open issues from the development backlog. The issues could be bugs, new features, or improvements on the existing code. For each sprint, read through your assigned issues, to get an idea of the code changes that need to be implemented. Choose one of your issues to work on, and follow the steps below to integrate your changes into the master branch. Note that each issue has a unique id in the form of ABC-1234. This id is used as the name of the feature branch you will work on. After developing the feature, the branch will be merged and incorporated into the master branch. Your home directory on the remote server contains a local clone of the central repository. Using this guide, you will make changes to the local clone, and push your changes to the central repo. Those change are then reviewed prior to being merged with the master.
This guide assumes you are working on issue ABC-1234
- Step 1: Launch Visual Studio Code, and enter your credentials to access the remote server via ssh. If you need to set up VS Code or remote access follow this guide.
- Step 2: Use VS Code to open a terminal window. (From top menu bar click 'Terminal -> New Terminal')
- Step 3: In the new terminal Type 'cd' to change to you home directory. Note: execute commands by pressing enter.
- Step 4: Type 'cd CAH' to enter the CAH directory
- Step 5: Type 'git pull origin master' to pull latest code into your CAH directory. This ensures you are developing off the latest version of the code.
* Step 6: Type 'configTestEnv' to configure your test environment. Each contributor will develop on a different port. This command configures your application to your developer port. - Step 6: Type 'git checkout -b ABC-1234' to switch to the ABC-1234 development branch. Remember to replace ABC-1234 with the issue id you are working on. This command will create a local development branch in your local git repository if the branch does not already exist.
- Step 7: Edit the code. Use step 7 to edit files necessary to implement and close the issue. Use VS Code's file explorer and file editor to implement your code changes.
* Step 8: Type 'checkFiles' to run a quality control script that automatically checks project files for any issues - Step 8: Type 'git add .' to stage the updated files for github. This lets version control know which files are ready for the central repo.
- Step 9: Type 'git commit -m "ABC-1234"' to commit changes to branch. Include the double quotes. The dash 'm' indicated message, and everything in the between quotes is the message you will attach. This command bundles all the changes for version control.
- Step 10: Type 'git push -u origin ABC-1234' to push changes to github (the central repo). When prompted input your github username, and password. This command pushes the changes to the feature branch on the central repo.
Step 10 will generate a pull request. Pull requests will notify the repo owner that changes are ready to be reviewed on the central ABC-1234 branch. The repo owner will then review the code changes, and either accept the changes or request rework from the developer.
If rework is required the developer may need to repeat steps 7-10, otherwise the repo owner will merge the development branch into the master branch, and close the issue.
Once the issue is closed, the developer can delete their local development branch. To do this follow steps 11-13.
- Step 11: Type 'git checkout master' to switch back to the master branch
- Step 12: Type "git pull origin master" to pull in the latest code from the repository
- Step 13: Type "git branch -D ABC-1234" to delete the development branch