Git Terminology Flashcards

1
Q

What is a working tree in Git?

A

The set of nested directories and files that contain the project that’s being worked on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a repository (repo) in Git?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a hash in Git?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an object in Git?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does it mean to commit in Git?

A

To make a commit object, committing the changes you have made so that others can eventually see them, too.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a branch in Git?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a remote in Git?

A

A named reference to another Git repository. Git creates a remote named origin that is the default for push and pull operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are commands, subcommands, and options in Git?

A

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 (–).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly