For a lot of people, GitHub is a place where you can find a lot of open source projects and store your own projects. But the core beauty of GitHub is its version control + collaboration features. This tutorial will help you understand the basics of GitHub and how to use it with GitHub Desktop.
Here is an extra line for Lena.
Git is a version control system that lets you manage and keep track of your files. Contrary to popular belief, Git can actually be fully local and doesn't require a remote server.
Git can be thought of as a tool that takes snapshots of your files and stores them in a hidden folder called .git
. This allows you to revert back to previous versions of your files and see the changes you've made. Moreover, if you want to try out different features or make changes to your code, you can create a new branch and work on that branch without affecting the main branch. For, the following materials could be different on another branch:
"If there are no dogs in Heaven, then when I die I want to go where they went." ― Will Rogers
GitHub is a cloud-based hosting service that lets you manage Git repositories. Similar services include GitLab and Bitbucket. Here we will be focusing on GitHub and introduce what additional features it provides.
The simplest way to get a GitHub repository is to download it as a ZIP file. However, this is not recommended as you are just getting a snapshot of the repository and not the full version control features.
To get the full version control features, you need to clone the repository. This will create a local copy of the repository on your computer and allow you to track changes made.
For public projects, you can help identify issues and report them to the owner. This can be done by going to the project's repository and clicking on the Issues
tab. Here you can see all the issues that have been reported and you can also report new issues.
Check sample_code.py
and see if you can find any issues. Submit it to the Issues section.
For public projects, usually you don't have write access to the repository. In this case, you can still make changes to the project by creating a fork
of the repository. This will create a copy of the repository under your account and you are free to make changes to it.
Once you are done, you can create a pull request
to the original repository and ask the owner to review and merge your changes.
Try to fix the bug in sample_code.py
and create a pull request.