Jennifer Collister, Xiaonan Liu
Translational Epidemiology Unit, NDPH/BDI
15th June 2021
This training session will provide a basic introduction to using hosted Git services (eg GitLab/GitHub) as part of your team’s workflow. We will introduce the concept of a remote repository, describe the Git commands required to work with one and highlight the benefits to collaboration provided by online platforms such as GitLab.
We will then describe a model workflow (“Feature Branch workflow”) for a small team using Git, including best practices, “branch etiquette”, opportunities to integrate code review and strategies for collaborating in a team where some members may be experienced Git users and others may be novices.
Finally there will be a live-coding session where participants will create a merge(/pull) request and resolve merge conflicts using a graphical user interface.
- Host platforms for remote Git repos (GitLab/GitHub)
- Workflow of using Git in a small scale team (2-5 people)
- Branching strategies and etiquette
- Merging and resolving merge conflicts
- Using merge requests to incorporate code review
- Clone a local copy of a remote repository
- Use the fetch, pull and push commands
- Create a merge(/pull) request
- Resolve merge conflicts
- Describe a model workflow for a small team using Git
- Know how to tag a “release version”
Participants should be comfortable creating and working in a solo Git repo
Individuals who are familiar with Git and want to start using it collaboratively with others within a small team.
If you wish to participate in the practical then a second screen may be helpful, but not necessary.
- Please install Git and VS Code
- Download instructions here
- Pro tip: If you install VS Code first, you should have the option to select it as your default editor during the Git installation
- Make an account on a hosted Git service
- Fork your own version of this demonstration repository and clone a local copy
If you have any difficulties with making your account or forking the demo repo, we will be available 10mins before the start of the session to help troubleshoot.
Presentation followed by live coding.
We will be using Windows (so will be better able to help with that) but participants can use iOS and Linux