Git-GitHub Concepts

Git-GitHub Concepts

Getting Started

Begin using GitHub to manage Git repositories and collaborate with teams.

Understand what Git is, learning resources, and essential tools.

Meanings of Terms or Concepts in Git & GitHub

Basic Concepts

  • 1 - What is a Repository?

  • A Repository is the fundamental element of GitHub. It is essentially a project folder, resembling the type of folder you find in Apple iCloud or Google Drive.

  • 2 - What is Commit?

  • While the literal translation of Commit is “commitment,” in Git & GitHub, it is more akin to the word “Save.” It involves updating a file in its original folder, replacing an old version. Commit is easily one of the most essential activities developers undertake using GitHub. Each commit represents a change made by an individual in a file (or group of files). It is similar to saving a file, except that in Git, each save generates a unique identifier (also known as SHA or hash) that allows you to keep a record of changes made and who made them.

  • 3 - What is Clone?

  • A clone is a copy of a repository on a developer’s computer rather than on a server elsewhere. Cloning is a good duplication that allows you to download code instructions for modification and changes, even in an offline mode, for editing in a code editor or integrated development environment.

  • 4 - What is Branch?

  • The branch is a similar version of the repository, branching off from the main repository, like a temporary subfolder. It exists in the repository but does not affect the main branch or project directly. This allows you to work freely without disrupting the direct main version.

  • 5 - What is Fetch?

  • Fetch refers to obtaining change events from a repository online (such as GitHub) without merging them. Once these changes are fetched, you can compare them with the local branches of code on your local machine.

  • 6 - What is Fork?

  • Fork is a personal copy of another user’s repository on your GitHub account. Forking allows you to make changes freely to a project without affecting the original project, providing limitless opportunities for experimentation and learning from others’ work. The forked project is also attached to the original project, allowing you to send a pull request to the original project owner to update the changes, ensuring that you always work on an up-to-date codebase.

  • 7 - What is Push?

  • Push refers to sending the changes you made to a repository on GitHub. For example, if you made a local change, you want to push these changes so that others can access them.

  • 8 - What is Pull?

  • Pull refers to the time when you bring changes and merge them. For instance, if someone edits a file in the project you are working on, you will need to pull or fetch these changes into your local copy to update it as well.

  • 9 - What is a Pull Request?

  • A Pull Request is a proposed change to a repository made by a user, which collaborators in the repository can accept or reject.

  • 10 - What is Issue?

  • Issues refer to proposed improvements or questions related to the repository. Anyone can create an issue for public repositories, and they are managed by collaborators.

  • 11 -What is Blame?

  • Blame is a feature in Git that reviews versions of code files that led to an error, helping identify the last modification to each line of the file.

  • 12 - What is Merge?

  • Merge takes changes from one branch within the same repo or from a fork and applies them to another branch. Merging can be done automatically through a pull request on the GitHub web interface or manually through the command line.

Additional Concepts

  • 13 - What is Check?

  • Check is a type of status check on GitHub, verifying the repository’s condition.

  • 14 - What is Collaborator?

  • A Collaborator is someone with read-and-write access to a repository, invited by the repository owner to contribute.

  • 15 - What is a Private Repository?

  • A Private Repository is a repository that can only be viewed or contributed to by the owner or designated collaborators.