Skip to content

Git and Github

Felipe Olmos edited this page Jun 30, 2023 · 15 revisions

Branch structure

The branch structure of our project follows a simple structure:

  • the main contains only the versions for the official releases
  • the dev branch is the contains the most up to date version of the sources
  • many short lived feature/fix branches that branch (merge) from (to) dev

The following schema shows the idea of the structure


                v10.1     v10.2
 main          --*---------*
                /         /
 dev           *---------*
                \       /|
 merged-feat     *--*--* |
                         \            
 unmerged-fix             *--*--*
                          (work in progress)

Typical workflow on Github

Note that this is a typical workflow, some steps may vary, skipped or done in another way

  • Create an issue describing the feature, bug of refactoring to be worked on
  • In the issue page in the right information bar, on the Development section click Create branch
    • The new branch will branch from dev as it is the default one
  • Fetch the branch (git fetch) from Github to your local copy of the repo
    • Github proposes you how to do it in the previous step
  • Switch to your branch (git switch branch-name), code and commit changes
  • Upon finishing, push your commits to Github (git push on your branch)
  • In Github create a pull request for your branch and request the review of at least one other member of the team
  • Discuss possible changes and fixes, then push them
    • The discuss/fix/push cycle may be repeated many times
  • Once the discussion is resolved the reviewer approves the PR and you merge the changes into dev