Git Terminology Flashcards
What is a working tree in Git?
The set of nested directories and files that contain the project that’s being worked on.
What is a repository (repo) in Git?
The directory, located at the top level of a working tree, where Git keeps all the history and metadata for a project. A bare repository is used for sharing or backup and usually ends in .git—for example, project.git.
What is a hash in Git?
A number produced by a hash function that represents the contents of a file or another object as a fixed number of digits. Git uses hashes that are 160 bits long.
What is an object in Git?
A Git repo contains four types of objects, each uniquely identified by an SHA-1 hash: blob (ordinary file), tree (directory), commit (specific version of the working tree), and tag (name attached to a commit).
What does it mean to commit in Git?
To make a commit object, committing the changes you have made so that others can eventually see them, too.
What is a branch in Git?
A named series of linked commits, with the most recent commit called the head. The default branch is called main (often named master), and the head of the current branch is named HEAD.
What is a remote in Git?
A named reference to another Git repository. Git creates a remote named origin that is the default for push and pull operations.
What are commands, subcommands, and options in Git?
Git operations are performed using commands like git push and git pull. The command is git, and push or pull is the subcommand. Options may accompany commands, using hyphens (-) or double hyphens (–).