Git workflow - GameLabGraz/Maroon GitHub Wiki


Setup

Some of the 3rd party components need their files to have a certain hash, therefore git (for Windows) needs to be configured to not change the line endings of those files when checking them out. The best way to achieve this is to configure git to "Checkout as-is, commit as-is".

images/git-line-endings.png

Overview

  • Protected branches: master, develop
  • All commits must be made to a non-protected branch
  • Separate branch for each task (action, feature, defect)

images/git_workflow.png

Procedure

  1. Create new feature branch
  • git checkout -b myFeature develop
  1. Commit your changes
  • git commit -m "my changes"
  1. Amend your changes for a clean history
  • git commit -amend
  1. Push your feature branch
  • git push
  1. Create Pull Request

Feature Branches

Name:

  • feature/Maroon-< issue number >_< short issue description >

Commit Message:

  • Maroon-< issue number >_< short issue description>
  • Empty line
  • < Description >

Clean Commit History:

  • git commit -amend
  • git squash

Pull Request

Pull requests let you tell others about changes you've pushed to the repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

If you want others to see your progress (this is encouraged) you can create a Pull request draft. This indicates that you are still working on your changes but lets others see what parts of the project you are about to change. Ideally this prevents very similar or conflicting changes.