Here is a comprehensive list of Git terminology:
- 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.
- 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).
- 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”.
- 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.
- Merging: The process of combining changes from two or more branches into a single branch. Merging can be done using the “git merge” command.
- 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.
- 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”.
- 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.
- Index: Another name for the staging area. The index is where changes are prepared for committing.
- Clone: A copy of a repository that is stored on your local machine. Cloning can be done using the “git clone” command.
- 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.
- 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.
- 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.
- Push: The act of uploading local changes to a remote repository. Pushing can be done using the “git push” command.
- Pull: The act of downloading remote changes to a local repository. Pulling can be done using the “git pull” command.
- 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.
- 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.
- 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.
- 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.
- Revert: The process of undoing changes made in a previous commit. Reverting can be done using the “git revert” command.
- Rebase: The process of reapplying a series of commits on top of another branch.
- 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: