Repository navigation
Project Workflow
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-6Make 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>or just simply:
$ git pushIf the master branch has been updated since you first branched off of it to start your story, you can ensure your branch is up to date with this:
$ git pull origin masterWhen 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