intro-to-github

A friendly introduction to GitHub as part of @OpenDataManchester's Pick N Mix series.

View the Project on GitHub rainsworth/intro-to-github

GitHub Interface Tour and Jargon Busting

One barrier to using Git and GitHub is that it can seem difficult to learn, because a lot of the terminology will be unfamiliar to newcomers. However, once you get used to the GitHub Flow, it will transform the way that you work - and the best way to learn is to dive right in and click around! Oh, and practice.

Interface Tour

  1. GitHub home page: https://github.com/ (sign up or log in!)
  2. GitHub dashboard: https://github.com/ (logged in)
    • Your personal dashboard is the main hub of your activity on GitHub.
    • The dashboard might be confusing until we cover the topics related to repositories (such as issues, pull requests, etc.).
    • But in general, your dashboard provides easy access to your recent repositories and organisations (left sidebar), your recent activity and all activity from people you follow (centre column), and to explore featured repositories (right sidebar).
    • Click the icon (your GitHub profile image or avatar) in the top right corner and select “Your profile”.
  3. GitHub profile: https://github.com/rainsworth
    • This is the page that shows information about a user’s activity on GitHub.
    • User profile information such as name, description, links and organisations can be seen in the left sidebar.
    • The Overview tab displays the user’s pinned repositories and contribution activity on GitHub.
    • The Repositories tab displays a list of the user’s repositories.
    • The Projects and Packages tabs are beyond the scope of this session, but you can click the “Learn More” buttons to learn more about them.
    • Click back to the Repositories tab and go to the intro-to-github repository.
  4. GitHub repository: https://github.com/rainsworth/intro-to-github
    • A repository (or “repo”) is the most basic element of GitHub. They’re easiest to imagine as a project’s folder. A repository contains all of the project files (including documentation), and stores each file’s revision history. Repositories can have multiple collaborators and can be either public or private.
    • At the very top you will see the user and repository name displayed as username/repository-name.
    • Underneath and to the right you will see buttons that say Watch, Star and Fork.
      • You can click Watch to watch a repository or issue to receive notifications when updates are made to an issue or pull request.
      • You can click Star to bookmark or display appreciation for a repository.
      • You can click Fork to make a personal copy of another user’s repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original upstream repository. You can also open a pull request in the upstream repository and keep your fork synced with the latest changes since both repositories are still connected.
    • Underneath that you will see a set of tabs labelled Code, Issues, Pull requests, etc. which we will navigate through now:
      • Code
        • This is the tab where you can view and interact directly with the contents of the repository.
        • In the right sidebar you will see information “About” the repository (such as a description, tagged topics, links to the README and license, release, package, contributor and environment information).
        • The repository file system is displayed in the centre (which contains the files associated with the project such as code, data, text, images, etc.).
          • Click through to a few of the files to preview them.
          • Example Markdown file (.md file)
            • Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform (GitHub automatically renders anything written in Markdown such as specific files like the README, or your comments on pull requests and issues).
        • The README is automatically rendered underneath the file system. The README is a text file containing information about the repository that is typically the first file a visitor to your repository will see.
          • It is general practice to compose the README in Markdown and save as README.md.
        • Above the file system is a set of buttons:
          • Branch (click to view the different development branches of the repository)
          • Go to file (click to easily search for a file within the repository)
          • Add file (click to add a new file to the repository)
          • Clone (click to clone the repository to your local workspace, open with the GitHub Desktop app or download the .zip file)
      • Issues
        • Click on the Example Issue.
        • Issues are suggested improvements, tasks or questions related to the repository.
        • Issues can be created by anyone (for public repositories), and are moderated by the repository owner.
        • Each issue contains its own discussion thread.
        • You can also categorise an issue with labels, assign it to someone and add to a project management board in the right sidebar.
      • Pull requests
        • Click on the Example pull request.
        • Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository’s owner.
        • Like issues, pull requests each have their own discussion forum which you can see in the Conversation tab.
        • You can also categorise a pull request with labels, assign it to someone, assign a reviewer, add to a project management board and link to open issues in the right sidebar.
        • The Commits tab displays the record of the specific changes saved along with who made them and when.
        • The Checks tab is beyond the scope of this session. Checks are external processes, such as continuous integration builds, which run for each commit you make in a repository. For more information, see “About status checks.”
        • The Files changed tab displays all the files that have been changed within the pull request and their associated “diffs” which are the difference in changes between two commits, or saved changes. The diff will visually describe what was added or removed from a file since its last commit.
      • Actions are beyond the scope of this session, but you can learn more about Getting started with GitHub Actions here
      • Projects
        • Click on the Example project.
        • Projects are boards within GitHub that are made up of issues, pull requests, and notes that are categorized as cards in columns.
        • They help you visualise your project workflow and enable project management.
        • This project has a basic kanban template which tracks my tasks with To do, In progress, and Done columns.
        • You can create cards and move them around to help visualise any bottlenecks in your development.
        • You can also click on “Add cards” to the right of the project board to create cards from issues and pull requests.
      • Wiki
        • Wikis provide a place in your repository to lay out the roadmap of your project, show the current status, and provide documentation.
      • Security
        • The Security tab is where you set up security features for your repository.
      • Insights
        • The Insights tab allows you to explore the activity within your repository such as an overview of issues and pull requests, who has contributed to the repository, traffic to the repository, the network graph (timeline of the most recent commits to this repository and its network ordered by most recently pushed to), who has forked the repository and more.
        • Click around the different items in the left sidebar to explore.
      • Settings
        • The Settings tab allows you to manage the settings of your repository, such as the repository name, enabling features, setting up GitHub pages (turning your repo into a website), deleting the repository, managing notifications and more.
        • Click around the different items in the left sidebar to explore.

Glossary

Definitions are from the GitHub Glossary with some minor edits, and icons by Icons8:


Previous: Examples of how GitHub is used

Next: Using GitHub Demonstration