Summary and Schedule
In this course you will be learning how to effectively collaborate with colleagues using Git and GitHub. Good working practices help us avoid mistakes, keep our codebases secure, and help us write sustainable code. Having clear practices for contributing to your repository encourages outside collaborators to contribute to your work. In this lesson we’ll look at what good practice using Git and GitHub might look like.
One process to develop new code with Git and GitHub looks like this:
- Open an Issue describing the feature or bug
- Create a branch to develop your changes on
- Make changes to your working copy
- Write tests
- Write documentation
- Open a Pull Request
- Review your changes
- Merge the Pull Request and close the Issue
- Tidy up your branches
During this workshop you will practice collaborating using a similar albeit simplified process on a test repository your instructors have set up. By the end of the course you should have the skills and knowledge to decide what working practices are best for you and your team.
Prerequisites
In this lesson we use Git from the Unix Shell. Some previous experience with the shell is expected, but isn’t mandatory.
This is a follow up course from the Version Control with Git lesson. Please ensure you are comfortable with the beginner material prior to starting this course.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Repository Access | What levels of repository permissions are there? |
Duration: 00h 10m | 2. Issues |
What information should go on an Issue? What are Issue templates? |
Duration: 00h 25m | 3. Branching Models | Which branching model is best for me? |
Duration: 00h 45m | 4. Feature Branch Model |
How can I use version control to collaborate with other people? What are Pull Request templates? |
Duration: 01h 30m | 5. Review |
How do I see a diff of the changes? How can I make inline comments or suggested changes? |
Duration: 02h 40m | 6. Break | |
Duration: 03h 40m | 7. History | Why is a linear history useful? |
Duration: 03h 55m | 8. Forks | What is a fork? |
Duration: 04h 40m | 9. Conflicts | What do I do when my changes conflict with someone else’s? |
Duration: 05h 10m | 10. End | |
Duration: 05h 20m | 11. Rebasing | When should I rebase? |
Duration: 06h 35m | 12. Pre-commit |
What quality assurance checks can I run using pre-commit checks? |
Duration: 07h 00m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Pre-workshop Survey
Please remember to fill out the pre-workshop survey prior to the start of the workshop. This information is vital for us to keep improving the lesson for other learners.
SSH Check
Run:
If you DO NOT see the output:
OUTPUT
Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.
Please go back to the introduction lesson’s SSH setup instructions.
Single sign-on (SSO) Check
If you are part of an organisation that requires single sign-on (SSO) to access their GitHub organisation you will need to authorise the SSH key for use in the organisation.
Next to the SSH key in the GitHub settings click on “Configure SSO”. Find the organisation in the list and click on “Authorise”. If the key is already authorised, it will say “Deauthorise” instead, and nothing more needs to be done.
Full instructions on SSH key setup and SSO authorisation can be found in the introduction lesson’s SSH setup instructions.
Give Your GitHub Username to the Instructors
In this lesson you will be working on a new repository, called
git-training-demo
, which your instructors have set up for
you. If you are working through this material as part of a workshop your
instructors will ask you to provide them with your GitHub username, no
other setup is required.
Failure to provide your GitHub username
If you do not provide your GitHub username to your instructors before the workshop your registration will be removed.
If you are working through this material in your own time you will
need to be provided with repository permissions for Episodes 1-5. Met
Office colleagues should request membership to the git-and-github-training
GitHub team. Met Office partners should email the Science
Git Migration Project with the subject: GH WP Training
Permissions Request, please include your GitHub username in the
email. Please be patient when you arrive at Episode 5 Review as you will
need to wait for an instructor to review your changes.