GitHub Repositories Cheat Sheet
A GitHub repository is a container that stores:
-
Project source code
-
Configuration files
-
Documentation
-
Git revision history
A repository tracks every change using Git version control and enables collaboration, review, and automation.
Repositories exist:
-
Under personal accounts
-
Under organizations
-
As public or private
Repository Visibility
Public Repository
-
Anyone can view the code
-
Anyone can fork the repository
-
Common for open-source projects
Private Repository
-
Access restricted to invited users or teams
-
Used for proprietary or internal projects
Repository Components
|
Component |
Description |
Key Characteristics |
|
Source Code |
Project files tracked by Git. |
|
|
Commit History |
Complete record of all changes. |
|
|
Branches |
Parallel lines of development. |
|
|
Tags |
Markers for specific points in history. |
|
Repository Terminology
Understanding the following terms is essential before working with GitHub repositories:
|
Term |
Description |
|
Branch |
An isolated line of development within a repository that allows changes without impacting the primary branch, typically main. |
|
Clone |
A full local copy of a repository downloaded from GitHub, including all files, folders, and complete version history. |
|
Fork |
A new repository created from an existing one under a different account, sharing the original codebase and visibility settings. |
|
Merge |
The act of integrating changes from one branch into another within a repository. |
|
Pull Request |
A formal request to merge changes between branches, enabling code review, discussion, and validation. |
|
Remote |
A repository hosted on GitHub that serves as a reference point for local repositories. |
|
Upstream |
The original repository or branch from which a fork or clone is created; the derived copy is considered the downstream. |
Repository Initialization Options
When creating a repository, you can include:
-
README.md – project overview
-
.gitignore – files Git should ignore
-
LICENSE – legal usage terms
Essential Repository Files
|
File |
Purpose |
Key Contents/ Recommendations |
|
README.md |
Provides an overview of the project |
|
|
CONTRIBUTING.md |
Defines how others should contribute |
|
|
CODE_OF_CONDUCT.md |
Establishes community behavior standards |
|
|
SECURITY.md |
Documents security reporting procedures |
|
Conclusion
References
https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories













