Introduction to GitHub
Arda Onur
1) What is GitHub?
GitHub is a cloud-based platform that uses Git, a distributed version control system, at its core
2) Introduction to Repositories
What is Repository?
A repository contains all of your project's files and each file's revision history.
How to create a repository?
You can create a new repository on your personal account or any organization where you have
permissions.
How to add a file to your repository?
In your repository, browse to the folder where you want to create a file by selecting the creating a new
file link or uploading an existing file.
Select Commit changes.
What are Gists?
Gists are a simplified way to share code snippets with others. Public gists are displayed publicly
where people can browse new ones as they’re created. Conversely, secret gists aren't searchable, but
If you send the URL of a secret gist to a friend, they'll be able to see it.
What are wikis?
Every repository on GitHub.com comes equipped with a section for hosting documentation, called a
wiki. You can use your repository's wiki to share long-form content about your project, while a
README file quickly tells what your project can do, you can use a wiki to provide additional
documentation.
3) Components of the GitHub Flow
What are branches?
Branches are an essential part to the GitHub experience, we can make changes without affecting
the entire project we're working on. Your branch is a safe place to experiment with new features
or fixes.
What are Commits?
A commit is a change to one or more files on a branch. Every time a commit is created, it's
assigned a unique ID and tracked along with the time and contributor.
The primary states for a file in a Git repository are Untracked and Tracked.
Untracked: An initial state of a file when it isn't yet part of the Git repository. Git is unaware of its existence.
Tracked: A tracked file is one that Git is actively monitoring. It can be in one of the following substates:
Unmodified: The file is tracked, but it hasn't been modified since the last commit.
Modified: The file has been changed since the last commit, but these changes aren't yet staged for the
next commit.
Staged: The file has been modified, and the changes have been added to the staging area (also known
as the index). These changes are ready to be committed.
Committed: The file is in the repository's database. It represents the latest committed version of the file.
What are Pull Requests?
A pull request is the mechanism used to signal that the commits from one branch are ready to be merged
into another branch.
The GitHub Flow
4) Collaborative Platform GitHub
Issues
GitHub Issues were created to track ideas, feedback, tasks, or bugs for work on GitHub.
Discussion
Discussions are for conversations that need to be accessible to everyone and aren't related to code.
Enabling a discussion in your repository
Create a new discussion
5)Resources
https://learn.microsoft.com/en-us/training/modules/introduction-to-github/