Repository navigation
Project Workflow
Corrina Del Greco edited this page Sep 18, 2020
·
9 revisions
The master branch will rarely be directly committed to. Generally we should create a new branch to work on each story card/issue. Once the necessary changes have been made, create a Pull Request so the changes can be reviewed, fixed, and merged.
- Update your local branch so that you have the most recent project code (git pull) and create a new branch off of that (git checkout) for the story card you are working on:
$ git pull && git checkout -b <branch-name>For this project, we'll use the branch naming convention lastname-storynumber. For example:
$ git pull && git checkout -b delgreco-6-
Make your changes and stage them (stage often to prevent data loss, commit when your code is working)
-
Here's a nice shortcut for staging files:
$ git add .- And here is the general commit form:
$ git commit -m "<commit-message>"- When you want to publish what you have locally so other people can see it online, use the following form:
$ git push -u origin <branch-name>- When you're finished, create a Pull Request on GitHub to have your changes reviewed and merged into the master branch.
- Two other team members must review and approve your Pull Request
- Address any comments, fix your code (stage, commit, and push your changes)
- When there's two approvals and you see it fit, you merge your own branch into the master branch