INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

GITHUB · FOUNDATIONS

GitHub basics: Git, repositories, pull requests and collaboration

GitHub hosts Git repositories and supports collaboration around them. Git records history; GitHub brings together discussion, review and checks. Learn to distinguish storing history, exposing it publicly and approving a change.

What you will learn

Explain the roles of Git and GitHub and distinguish visibility, branches, pull requests and permissions.

Prerequisite

A commit records content; a branch names a history position. The SQL change from the Git lesson is reviewed here so you can follow the example.

Where do Git and GitHub differ?

Local history and collaboration on GitHub
LOCAL
Local Git

Manage working files, the index, commits and branches.

HOST
Repository on GitHub

Host shared history with explicit visibility and permissions.

PROPOSE
Pull request

Propose integration and collect the diff and discussion.

DECIDE
Reviews and checks

Use human judgment and automated validations to assess integration.

Sharing history and approving a change are distinct. Having a GitHub repository does not by itself deploy changes.

A repository holds project files and revision history. In the fictional name demo-acme/report-infra, demo-acme is the owner and report-infra is the repository name. GitHub adds ways to discuss and manage work around that history.

Separate visibility from permission to act

Two decisions to check first
DecisionWhat to establish
Who can see it?Public content is broadly readable; private access is restricted. Available visibility options depend on the account and plan.
Who can act?Check read, update, administration and review rights, together with protection rules.

Private visibility is not a safety verdict on contributed code. Authorized contributors can still make mistakes or act maliciously. Committed secrets may remain accessible through history and copies. Keep sensitive values out of commits and constrain runtime privileges.

Propose a branch change with a pull request

Suppose main points at original B and feature/jp-report-filter at proposed H. H adds region = JP to an approved-report query. Recording a change on a branch differs from integrating it into main. B and H are teaching labels.

Fictional PR #42 asks whether to integrate H into main. Read the diff in Files changed, discussion in Conversation, proposed history in Commits and validations in Checks. If approved US report R-B disappears, ask whether that meets the requirement.

Main review decisions
DecisionMeaning
CommentLeave feedback without an approval or change-request decision.
ApproveSupport integration; this is separate from merging or deploying.
Request changesIdentify changes that should be addressed before integration.

A successful automated check is not a human requirements decision. Assess integration against the current diff, required reviews and checks, permissions and configured bypasses. Opening a PR establishes neither approval nor a merge.

Reading a contribution differs from executing it

A fork is a separate repository sharing history with an upstream repository, and can be used to propose contributions. Readable source on GitHub is still untrusted until reviewed; do not infer authority to run it with privileges.

  1. Review workflow, dependency and execution-destination changes as well as SQL or configuration.
  2. Identify who receives secrets or tokens and what the runner can reach.
  3. Keep visibility separate from reviewed, tested and deployed states.

Check the role of GitHub

Choose an option to see the result and explanation.

Which statement correctly relates Git and GitHub?
Read the answer and reason

Answer: Git manages history; GitHub hosts it and supports collaboration. · Separate local history from hosted pull requests and reviews.

Which decision still matters for a private repository?
Read the answer and reason

Answer: Decide read access separately from authority to execute contributed code. · Visibility and the runner or credential trust boundary are separate.

What does opening a pull request establish?
Read the answer and reason

Answer: A proposal to integrate changes exists. · Approval, checks, merging and delivery remain separate states.

Can required reviews be assumed available in every private repository?
Read the answer and reason

Answer: No. Check plan, visibility and configured branch rules. · A feature being available does not mean a particular branch requires it.

Check, then explain in your own words

  1. Name one role for local Git and one for GitHub.
  2. Separate private visibility from permission to execute a contribution.
  3. Distinguish a PR proposal, review approval and merge.
Check your understanding: May an unreviewed PR receive deployment privileges because its repository is private?

No. Visibility and trust in executable code are separate decisions.

Private restricts visibility. Access to runners and credentials depends on reviewed changes and execution privileges.

Sources and conditions checked

Primary references are collected here with their scope, conditions and corresponding sections. Independent expert review and live-environment validation have not been performed.