- You will be able to create a repository on Github
- You will be able to clone a repository using Github Desktop
- You will be able to make changes to a repository using Github Desktop
- You can define what the differences between Git and Github are
- You can use git to submit all your homeworks to Github
It is important that all of the attendees have access to the CodeYourFuture Github Teams. Make sure that they have all been added and if they haven't add them.
What is the problem?
When programmers work together it can be hard to stay in sync. This can be demonstrated by:
- Have one person write three words on a piece of paper
- Give the paper to the teacher and the teacher makes a copy of it
- Somebody else can request the paper from the teacher
- Change a word on the paper and give it back to the teacher.
The teacher is the single source of truth for the project. This is fine so long as both people don't make a change at the same time.
- Now both students change a word on their piece of paper
- They then try to give both pieces of paper to the teacher
- But the teacher doesn't know what to do! Which one is correct?
This is why Git was invented!
What is Github?
Give an overview of Github including
- A Project Overview
- Creating a repository
- Changing a file in a repository
Glossary - Repository - A repository is like a folder on your computer. It can hold a lot of other files. Glossary - Commit - When you commit - you are saving the file to your repository
All students should now complete the following steps
What is Github Desktop?
Github Desktop is a way to edit files on your computer instead of editing them online.
Give a demonstration of
- Cloning a repository
- Making a change to a file in the repository
- Committing the changes to our local repository
- Pushing our changes to Github
Glossary - Clone - Clone means to create a copy of the repository on your laptop Glossary - Push - Push means to send your saved copy of the repository to Github Glossary - Fetch - Find out if there have been any changes to the repository Glossary - Pull - Get the latest changes from the repository
The students should now complete the following steps
Each person in the group should try this
What about working in Teams?
Github also makes it really easy to work in teams.
One way that we could work in a team is by making a list of our favorite things.
In your teams you should
- Each clone this repository to their computers
- Each team member should take it in turns changing one work in the ReadMe.md file in the project.
- Make a list of your favorite things. This can be food, hobbies or places. It's completely up to you!
Be careful! Don't all add words at the same time!
Sometimes it can be useful to work on something for a long time before showing it to everyone. This is why we use branching.
The teacher should
- Show how you can create a branch in Github Desktop
- Show how moving between Master and the Branch keeps two versions of the file
All students should now
Branching is particularly helpful for using in Pull Requests
- The teacher should show how to make a Pull Request in Github
- The teacher should show how to comment on a PR in Github
- The teacher should show how to merge a pull request in Github
Now the students should try this themselves
(Optional) What is Git?
This is advanced!
The Github Desktop tool is actually built on top of something called Git. Git lives entirely in the command line.
The teacher should show
- How to clone a repository
- How to make a commit
- How to how to push to the repository
This is only to show students how it's done! We'll be doing more of this in the future.
- What is a repository?
- A repository is like a
- What is Github?
- What is git?