Git Workflow - GeeksterJH/coloretto GitHub Wiki

To add new features to the project we will be using git branches. A branch allows you to create a separate workspace in the git project where you can make as many changes as you want without affecting the rest of the project. Once you've made all your changes/commits/... you can create a pull request to merge it with the actual project.


  1. To create a new branch, use the command git checkout -b <name_of_branch>, the name of the branch should describe the feature you're implementing.
  2. On this branch you can make as many changes and commits as you like without having to worry about messing up the project.
  3. To upload your branch to github, use git push -u origin <name_of_branch>
  4. Once you're done with the feature and you're certain everything works, you can make a pull request by going to the pull requests tab on github and clicking New pull request
  5. Next up, you need to select your branch, give your pull request a description and click New pull request
  6. Once you've made the pull request I will be able to see it and comment on it if it needs any more changes.
  7. Once the feature is ready it can be merged into the master branch
  8. Once the pull request is merged into the master branch, you will have to switch back to the master branch using git checkout master and then run git pull origin master to bring everything up to date. From here, you can create a new branch to implement another feature.

Making A Git Commit

  • use git add . to add all your changes
  • use git commit -m "<commit message here>" Your commit message should describe what you've changed and why
  • use git push -u origin <name_of_branch> to push your code to github, make sure you don't use git push because that will push your changes to the master branch