Work with GitHub Repositories

This skill area is 10–15% of the exam. It covers the anatomy of a repository and its key community-health files, creating and organizing repos with templates and branches, adding and managing files, and using insights, stars, and metrics for visibility and maintenance.

Disclaimer: These are personal study notes for learning purposes only. Always verify against the official study guide.

Repository Structure & Key Files

A GitHub repository stores your project's files and their full revision history. Certain community health files have special meaning — GitHub surfaces them in the UI. Know each one and its purpose.

FilePurpose
README.mdThe front page of the repo — describes what the project is, how to install and use it. Rendered automatically on the repo home page.
LICENSEDefines the legal terms under which others may use, modify, and distribute the code (e.g. MIT, Apache-2.0, GPL). Without it, default copyright applies.
CONTRIBUTING.mdGuidelines for how to contribute. GitHub links to it when someone opens an issue or PR.
CODEOWNERSDefines individuals/teams responsible for code in specific paths. Owners are automatically requested for review when matching files change.
SECURITY.mdExplains how to responsibly report a security vulnerability in the project.
CODE_OF_CONDUCT.mdSets community behavior expectations for participants.
.gitignoreLists files/patterns Git should not track (build output, secrets, local config).
⚠ Exam Tip — CODEOWNERS

CODEOWNERS is a favorite exam target: its job is to automatically request review from the right people when files they own are modified in a pull request. It can live in the repository root, .github/, or docs/.

💡 Default Community Health Files

Place default community health files (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, issue/PR templates) in a special .github repository in your organization, and they apply to every repo that doesn't define its own. This avoids duplicating the same files everywhere.

Create, Organize & Maintain Repositories

You can create a repository from scratch, from a template, or by importing/forking. When creating, you choose an owner (you or an org), a name, visibility (public/private), and optional initialization (README, .gitignore, license).

Template Repositories

ⓘ Template vs. Fork

Template: fresh start, no shared history, independent project. Fork: keeps full history and stays linked to the upstream repo so you can open pull requests back to it. Choose a template for scaffolding; choose a fork to contribute changes upstream.

Branches

Adding & Managing Files

Ways to Add and Edit Files

💡 Committing Edits in the Web UI

When you edit a file on GitHub.com, you can commit directly to the branch or create a new branch and start a pull request. Choosing the new-branch option is the GitHub-Flow-friendly path for reviewed changes.

Insights, Stars & Metrics

GitHub provides visibility tools to track a repository's activity, health, and dependencies.

FeatureWhat it shows
Insights tabPulse (recent activity), contributors, traffic, commit and code-frequency graphs, and community-standards checklist.
StarsA bookmark and popularity signal — users star repos to save them and to show appreciation. Star counts help others gauge a project's reach.
WatchSubscribe to notifications about a repo's activity (all activity, or just releases/issues).
Dependency graph & insightsShows the packages/projects the repo depends on and repos that depend on it; underpins Dependabot alerts.
Feature previewsOpt in to try new/beta GitHub features before general availability.
ⓘ Star vs. Watch vs. Fork

Three easily-confused actions: Star = bookmark / show appreciation (no notifications). Watch = subscribe to activity notifications. Fork = make your own copy to modify or contribute back. Expect a question distinguishing these.

Maintenance Best Practices

Study Resources