Introduction to GitHub Mini Lesson
By: some apcs students
Table of Contents
1.
3.
2.
What is GitHub?
GitHub Essentials
Why is GitHub important?
01
What is GitHub?
What is GitHub?
GitHub is a development platform that allows programmers to store their code. It also allows developers to collaborate on multiple projects and publish their projects. There are currently over 100 million people using GitHub and over 420 million repositories.
Collaborators
When creating a repository, the owner can add collaborators. These collaborators will work with the owner on projects in the repository. The owner has access to all of the features of the repository and can limit access of the collaborators. They can also kick collaborators out of the repository.
Organizations
Organizations are shared accounts where multiple developers can collaborate on multiple projects at the same time. The organization account is the container for all of the projects within the organization. Personal accounts can work on projects within the organization by joining the organization account. You can invite an unlimited number of people to join an organization. People that might use GitHub organizations include companies, non-profits, or other large groups
02
GitHub Essentials
Basic Features of GitHub
Used to store code and collaborate
Branches
Push & Pull
Repositories
History of pushes
Used to test things
Commits
Used when editing and adding
Pushing and Pulling
When you’ve added something to your GitHub project, you need to save it. That’s called pushing— you’re basically pushing your edits to the GitHub server, so that the online version of your project reflects the local version of your project.
In cases of collaboration, if someone pushes an edit to the repository, someone else will have to pull it onto their local version of the project. That updates their project to include the changes that were pushed to GitHub.
Repositories
Repositories are like a Google Drive folder. They hold all your code and project assets, can have subfolders in them, and can be shared with collaborators. A repository is usually associated with a single project, and an organization can have multiple repositories. When someone is added as a collaborator to a repository, they automatically get access to basically everything in the repository as well.
Some default functions repositories can be used for are
Commits
Commits are like the Google Doc history. It is like saving a file after it has been edited.
Each commit is assigned a unique ID, called a hash or SHA(Secure Hash Algorithm), detailing who made what changes when.
Users include a commit message that briefly describes the changes made, using these save points to draw out a story of the repository’s history. These commits should be made at logical points in time, and following the overall code history.
It is also possible to undo commits, but keep in mind what issues it may cause for collaborators. Undoing a commit on local work is much safer.
Branches
Branches are pointers to snapshots of changes. A repository can include multiple branches, but branches cannot exist without a repository.
With branches, you can work to solve a problem or experiment in a controlled part of the repository. If everything works out, this new branch can be merged into the main branch.
03
Why is GitHub important?
Needed in Software Development…
Allows software developers to TRACK, STORE, COLLABORATE, and BUILD on each others’ work! It’s a “social coding platform.”
For developers to work on a single project with the benefit of version control.
-> What is version control?
A system that keeps track of files/projects, which helps software teams revert to the original if needed. It gives the developers the freedom to experiment without fear of making mistakes that can cause bugs that could crash the whole thing.
Personal Stories
go look at the modding guide google
doc for these lmao