Course overview


Collaborating with Git and GitHub


Branching and merging


Figure 1

{alt=‘Linear’ class=“img-responsive”}


Figure 2

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 3

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 4

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 5

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 6

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 7

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 8

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 9

As the experiment branch is still present there is no reason further commits can’t be added to it. Create a new commit in the experiment branch adjusting the amount of coriander in the recipe. Then merge experiment into main. {alt=‘Gitcollaborative’ class=“img-responsive”}


Merge conflicts


Figure 1

{alt=‘Git collaborative’ class=“img-responsive”}


Figure 2

{alt=‘Git collaborative’ class=“img-responsive”}


Rewriting history with Git


Figure 1

Rebase process with a feature branch being moved to another branch

Pulling and Pushing


Figure 1

  • Changes in the staging area will not be synchronised. {alt=‘Git collaborative’ class=“img-responsive”}

  • Figure 2

  • If the current branch has no upstream yet, you can configure one by doing git push --set-upstream origin BRANCH_NAME, as done with main in the example below. The --set-upstream flag can be replaced by a shortcut -u. So you can use git push -u origin BRANCH_NAME instead. {alt=‘Git collaborative’ class=“img-responsive”}

  • Figure 3

    {alt=‘Git collaborative’ class=“img-responsive”}


    End of first session


    Managing contributions to code


    Figure 1

  • On GitHub.com, navigate to your repository and choose your branch which contains your changes from the “Branch” menu. Choose branch

  • Figure 2

  • From the “Contribute” drop-down menu, choose the “Open pull request” button. Open pull request

  • Figure 3

  • From the base branch drop-down menu, choose the branch you want your changes to be merged into, and in the compare drop-down menu, choose the branch which contains your changes. Choose the base and compare branches from the drop-down

  • Figure 4

  • After giving a suitable title and description for your pull request, click the “Create pull request” button. Pull request title and description fields and create pull request button

  • Using GitHub actions for continuous integration


    Figure 1

    {alt=‘Failing CI’ class=“img-responsive”}


    Code versions, releases and tags


    Figure 1

    1 tags

    Figure 2

    Creating a new release

    Figure 3

    Choose your tag

    Figure 4

    Publish your release

    Figure 5

    View release

    Collaborative development


    Figure 1

    Use this template

    End of second session