Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

GitHub Tutorial

Seyfi Kutay Kılıç edited this page Feb 17, 2019 · 19 revisions

What is Git?

Git is a version control system. It is used for tracking changes in source code during software development and enables coordination between software developers.

What is Version Control System?

A version control system tracks the history of changes as people and teams collaborate on projects together. It records changes to a file or set of files over time so that developers can recall specific versions later. Developers can review project history to find out:

  • Which changes were made?
  • Who made the changes?
  • When were the changes made?
  • Why were changes needed?

webp net-resizeimage

Why is Git useful?

  • If developers accidentally delete or change their code, using git can help them to get it back.
  • Git lets developers share and exchange code with other developers easily.
  • Git lets everybody track recent changes in a software project.
  • Git lets developers backup their code easily to a remote server.

GitHub Terms:

Watch: GitHub has always made it easy to "watch" a project, which means you're notified whenever there are any updates.
Stars: Stars are a new way to keep track of repositories that you find interesting. When you star a project you can keep track of it, but you won't be notified of every change.
Fork: A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
Pull requests: Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
Merge: Merging takes the changes from one branch (in the same repository or from a fork), and applies them into another.
Pull: Pull refers to when you are fetching in changes and merging them.
Branch: A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.
Commit: A commit, or "revision", is an individual change to a file (or set of files).
Fetch: Fetching refers to getting the latest changes from an online repository without merging them in.
Status and Status Check: A status is a type of status check on GitHub. Status checks are external processes, such as continuous integration builds, which run for each commit you make in a repository.

Some Common Git Commands

  • git init [repo name] = This command creates new repo.
  • git clone [url] = This command clones a repo from an URL into a local directory.
  • git add [filename] = This command adds a file to the staging area.
  • git commit -m "[message]" = This command records changes to the local repository.
  • git pull = This command gets the changes from the remote repo and updates the local repo.
  • git status = This command prints the files that can be committed.
  • git merge [branch] = This command merges the specified branch into current branch.
  • git push = This command sends changes of master branch to remote repo.

Resources:

  1. http://blog.robertelder.org/what-is-git/
  2. https://guides.github.com/introduction/git-handbook/
  3. https://danielkummer.github.io/git-flow-cheatsheet/
  4. https://www.edureka.co/blog/git-commands-with-example/#git%20init
  5. https://help.github.com/articles/github-glossary/
  6. https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf
  7. https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control

Clone this wiki locally