Git Terminology

Here is a comprehensive list of Git terminology:

  1. Repository: A collection of files and their history, stored in a Git database. Repositories can be hosted on a central server (e.g. GitHub or GitLab) or stored locally on a developer’s machine.
  2. Commit: A snapshot of the changes made to a repository at a specific point in time. Commits include a message that describes the changes, an identifier (hash) that uniquely identifies the commit, and a reference to the parent commit(s).
  3. Branch: A separate line of development within a repository. Branches can be used to work on multiple features or bug fixes simultaneously. By default, Git repositories have a single branch named “master”.
  4. Master Branch: The default branch in a Git repository, often used as the main line of development. The master branch is usually the branch that is deployed to production.
  5. Merging: The process of combining changes from two or more branches into a single branch. Merging can be done using the “git merge” command.
  6. Pull Request: A request to merge changes from one branch into another branch. Pull requests are often used for code review and collaboration. Pull requests can be created on platforms like GitHub and GitLab.
  7. Staging Area: A place where changes can be reviewed and prepared for committing to the repository. The staging area is also referred to as the “index”.
  8. HEAD: A pointer that always points to the latest commit in the current branch. The HEAD reference can be used to checkout different branches or switch between commits.
  9. Index: Another name for the staging area. The index is where changes are prepared for committing.
  10. Clone: A copy of a repository that is stored on your local machine. Cloning can be done using the “git clone” command.
  11. Fork: A copy of a repository that is stored on a different account. Forks can be used to create a personal copy of a repository for testing or contribution purposes.
  12. Remote: A copy of a repository that is stored on a different machine. Remotes can be used to collaborate with others or download updates from a central repository.
  13. Remote Repository: A copy of a repository that is stored on a different machine, usually on a hosting service like GitHub or GitLab. Remote repositories can be used for collaboration and sharing code.
  14. Push: The act of uploading local changes to a remote repository. Pushing can be done using the “git push” command.
  15. Pull: The act of downloading remote changes to a local repository. Pulling can be done using the “git pull” command.
  16. Fetch: The act of downloading information about remote changes, without merging them into the local repository. Fetching can be done using the “git fetch” command.
  17. Tag: A named reference to a specific commit in a repository. Tags are often used to mark releases or milestones. Tags can be created using the “git tag” command.
  18. SHA-1 Hash: A unique identifier for each commit, calculated using the SHA-1 algorithm. The SHA-1 hash is used to reference specific commits in Git.
  19. Blame: The process of identifying who made changes to specific lines of code in a repository. The blame command can be run using the “git blame” command.
  20. Revert: The process of undoing changes made in a previous commit. Reverting can be done using the “git revert” command.
  21. Rebase: The process of reapplying a series of commits on top of another branch.
  22. Cherry-pick: The process of applying a specific commit from one branch to another branch.

These are some of the most important Git terms you should be familiar with. Knowing these terms will help you communicate effectively with other Git users and understand Git documentation.

Please follow and like us:
Content Protection by DMCA.com