Identifiers & Environment Variables Flashcards

Memorize Git identifiers and environment variables so you'll never have to look them up again.

1
Q

What does the following Git identifier or environment variable do:

< object >

A

Indicates the object name for any type of object.

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

What does the following Git identifier or environment variable do:

< blob >

A

Indicates a blob object name.

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

What does the following Git identifier or environment variable do:

< tree >

A

Indicates a tree object name.

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

What does the following Git identifier or environment variable do:

< commit >

A

Indicates a commit object name.

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

What does the following Git identifier or environment variable do:

< tree-ish >

A

Indicates a tree, commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences and objects that point at a.

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

What does the following Git identifier or environment variable do:

< commit-ish >

A

Indicates a commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences objects that point at a.

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

What does the following Git identifier or environment variable do:

< type >

A

Indicates that an object type is required. Currently one of: blob, tree, commit, or tag.

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

What does the following Git identifier or environment variable do:

< file >

A

Indicates a filename - almost always relative to the root of the tree structure GIT_INDEX_FILE describes.

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

What does the following Git identifier or environment variable do:

GIT_INDEX_FILE

A

This environment allows the specification of an alternate index file. If not specified, the default of $GIT_DIR/index is used.

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

What does the following Git identifier or environment variable do:

GIT_OBJECT_DIRECTORY

A

If the object storage directory is specified via this environment variable then the sha1 directories are created underneath - otherwise the default $GIT_DIR/objectsdirectory is used.

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

What does the following Git identifier or environment variable do:

GIT_ALTERNATE_OBJECT_DIRECTORIES

A

Due to the immutable nature of git objects, old objects can be archived into shared, read-only directories. This variable specifies a “:” separated (on Windows “;” separated) list of git object directories which can be used to search for git objects. New objects will not be written to these directories.

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

What does the following Git identifier or environment variable do:

GIT_DIR

A

If the GIT_DIR environment variable is set then it specifies a path to use instead of the default .git for the base of the repository.

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

What does the following Git identifier or environment variable do:

GIT_WORK_TREE

A

Set the path to the working tree. The value will not be used in combination with repositories found automatically in a .git directory (i.e. $GIT_DIR is not set). This can also be controlled by the –work-tree command line option and the core.worktree configuration variable.

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

What does the following Git identifier or environment variable do:

GIT_CEILING_DIRECTORIES

A

This should be a colon-separated list of absolute paths. If set, it is a list of directories that git should not chdir up into while looking for a repository directory. It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment. (Useful for excluding slow-loading network directories.)

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

What does the following Git identifier or environment variable do:

GIT_DISCOVERY_ACROSS_FILESYSTEM

A

When run in a directory that does not have “.git” repository directory, git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries. This environment variable can be set to true to tell git not to stop at filesystem boundaries.

LikeGIT_CEILING_DIRECTORIES, this will not affect an explicit repository directory set via GIT_DIR or on the command line.

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

What does the following Git identifier or environment variable do:

GIT_MERGE_VERBOSITY

A

A number controlling the amount of output shown by the recursive merge strategy. Overrides merge.verbosity. See git-merge(1)

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

What does the following Git identifier or environment variable do:

GIT_PAGER

A

This environment variable overrides $PAGER. If it is set to an empty string or to the value “cat”, git will not launch a pager. See also the core.pager option in git-config(1).

18
Q

What does the following Git identifier or environment variable do:

GIT_SSH

A

If this environment variable is set then git fetch and git push will use this command instead of ssh when they need to connect to a remote system. The $GIT_SSH command will be given exactly two arguments: the username@host (or just host) from the URL and the shell command to execute on that remote system. To pass options to the program that you want to list in GIT_SSH you will need to wrap the program and options into a shell script, then set GIT_SSH to refer to the shell script. Usually it is easier to configure any desired options through your personal .ssh/config file. Please consult your ssh documentation for further details.

19
Q

What does the following Git identifier or environment variable do:

GIT_ASKPASS

A

If this environment variable is set, then git commands which need to acquire passwords or passphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable prompt as command line argument and read the password from its STDOUT. See also the core.askpass option in git-config(1).

20
Q

What does the following Git identifier or environment variable do:

GIT_FLUSH

A

If this environment variable is set to “1”, then commands such as git blame (in incremental mode), git rev-list, git log, and git whatchanged will force a flush of the output stream after each commit-oriented record have been flushed. If this variable is set to “0”, the output of these commands will be done using completely buffered I/O. If this environment variable is not set, git will choose buffered or record-oriented flushing based on whether stdout appears to be redirected to a file or not.

21
Q

What does the following Git identifier or environment variable do:

GIT_TRACE

A

If this variable is set to “1”, “2” or “true” (comparison is case insensitive), git will print trace: messages on stderr telling about alias expansion, built-in command execution and external command execution. If this variable is set to an integer value greater than 1 and lower than 10 (strictly) then git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor. Alternatively, if this variable is set to an absolute path (starting with a / character), git will interpret this as a file path and will try to write the trace messages into it.

22
Q

Name the Git identifier or variable that does the following:

Indicates the object name for any type of object.

A

< object >

23
Q

Name the Git identifier or variable that does the following:

Indicates a blob object name.

A

< blob >

24
Q

Name the Git identifier or variable that does the following:

Indicates a tree object name.

A

< tree >

25
Q

Name the Git identifier or variable that does the following:

Indicates a commit object name.

A

< commit >

26
Q

Name the Git identifier or variable that does the following:

Indicates a tree, commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences and objects that point at a.

A

< tree-ish >

27
Q

Name the Git identifier or variable that does the following:

Indicates a commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences objects that point at a.

A

< commit-ish >

28
Q

Name the Git identifier or variable that does the following:

Indicates that an object type is required. Currently one of: blob, tree, commit, or tag.

A

< type >

29
Q

Name the Git identifier or variable that does the following:

Indicates a filename - almost always relative to the root of the tree structure GIT_INDEX_FILE describes.

A

< file >

30
Q

Name the Git identifier or variable that does the following:

This environment allows the specification of an alternate index file. If not specified, the default of $GIT_DIR/index is used.

A

GIT_INDEX_FILE

31
Q

Name the Git identifier or variable that does the following:

If the object storage directory is specified via this environment variable then the sha1 directories are created underneath - otherwise the default $GIT_DIR/objectsdirectory is used.

A

GIT_OBJECT_DIRECTORY

32
Q

Name the Git identifier or variable that does the following:

Due to the immutable nature of git objects, old objects can be archived into shared, read-only directories. This variable specifies a “:” separated (on Windows “;” separated) list of git object directories which can be used to search for git objects. New objects will not be written to these directories.

A

GIT_ALTERNATE_OBJECT_DIRECTORIES

33
Q

Name the Git identifier or variable that does the following:

If the GIT_DIR environment variable is set then it specifies a path to use instead of the default .git for the base of the repository.

A

GIT_DIR

34
Q

Name the Git identifier or variable that does the following:

Set the path to the working tree. The value will not be used in combination with repositories found automatically in a .git directory (i.e. $GIT_DIR is not set). This can also be controlled by the –work-tree command line option and the core.worktree configuration variable.

A

GIT_WORK_TREE

35
Q

Name the Git identifier or variable that does the following:

This should be a colon-separated list of absolute paths. If set, it is a list of directories that git should not chdir up into while looking for a repository directory. It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment. (Useful for excluding slow-loading network directories.)

A

GIT_CEILING_DIRECTORIES

36
Q

Name the Git identifier or variable that does the following:

When run in a directory that does not have “.git” repository directory, git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries. This environment variable can be set to true to tell git not to stop at filesystem boundaries. LikeGIT_CEILING_DIRECTORIES, this will not affect an explicit repository directory set via GIT_DIR or on the command line.

A

GIT_DISCOVERY_ACROSS_FILESYSTEM

37
Q

Name the Git identifier or variable that does the following:

A number controlling the amount of output shown by the recursive merge strategy. Overrides merge.verbosity. See git-merge(1)

A

GIT_MERGE_VERBOSITY

38
Q

Name the Git identifier or variable that does the following:

This environment variable overrides $PAGER. If it is set to an empty string or to the value “cat”, git will not launch a pager. See also the core.pager option in git-config(1).

A

GIT_PAGER

39
Q

Name the Git identifier or variable that does the following:

If this environment variable is set then git fetch and git push will use this command instead of ssh when they need to connect to a remote system. The $GIT_SSH command will be given exactly two arguments: the username@host (or just host) from the URL and the shell command to execute on that remote system. To pass options to the program that you want to list in GIT_SSH you will need to wrap the program and options into a shell script, then set GIT_SSH to refer to the shell script. Usually it is easier to configure any desired options through your personal .ssh/config file. Please consult your ssh documentation for further details.

A

GIT_SSH

40
Q

Name the Git identifier or variable that does the following:

If this environment variable is set, then git commands which need to acquire passwords or passphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable prompt as command line argument and read the password from its STDOUT. See also the core.askpass option in git-config(1).

A

GIT_ASKPASS

41
Q

Name the Git identifier or variable that does the following:

If this environment variable is set to “1”, then commands such as git blame (in incremental mode), git rev-list, git log, and git whatchanged will force a flush of the output stream after each commit-oriented record have been flushed. If this variable is set to “0”, the output of these commands will be done using completely buffered I/O. If this environment variable is not set, git will choose buffered or record-oriented flushing based on whether stdout appears to be redirected to a file or not.

A

GIT_FLUSH

42
Q

Name the Git identifier or variable that does the following:

If this variable is set to “1”, “2” or “true” (comparison is case insensitive), git will print trace: messages on stderr telling about alias expansion, built-in command execution and external command execution. If this variable is set to an integer value greater than 1 and lower than 10 (strictly) then git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor. Alternatively, if this variable is set to an absolute path (starting with a / character), git will interpret this as a file path and will try to write the trace messages into it.

A

GIT_TRACE