Git Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Working directory / tree

A

The project directory associated with (containing) the local repository

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

Staging area / index

A

A file in your local repository containing the changes to the working directory that will go into the next commit

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

Local repository

A

A directory containing a snapshot and metadata for each of your commits; .git

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

Remote repository

A

A repository hosted on a network (internet)

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

Git init

A

Initializes an empty Git repository

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

Git add

A

Adds selected files to the staging area

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

Git status

A

Shows files that are:

  • Untracked
  • Modified but unstaged
  • Staged but uncommited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Git commit

A

Creates a new commit (snapshot) with the files in the staging area

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

Git diff

A

Shows the differences between two objects (commits, files, trees, indices, etc)

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

Git log

A

Shows a list of all commits made to a repository

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

Git push

A

Updates the remote repository with the new commits from the local repository

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

Git fetch

A

Downloads the remote repository without updating the local repository; used to see what changes have been made since your last fetch or pull

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

Git merge

A

Joins two or more development histories (branches) together; used for merging new features into the main branch

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

Git pull

A

Fetches content from a remote repository and merges it with your local branch; a combination of fetch and merge

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

Git branch

A

Creates a new branch

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

Git checkout

A

Updates the working directory and HEAD to match the specified branch or commit

17
Q

Git

A

A distributed version control system; used for tracking and managing changes to a code base

18
Q

Three states of Git

A
  • Modified
  • Staged
  • Committed
19
Q

Git clone

A

Initializes a local repository with the contents of a specified remote repository and sets up remote tracking

20
Q

HEAD

A

Refers to the currently active commit

21
Q

Forking

A

Copying a remote repository without a connection to the original (like clone); used for changing code without affecting the original

22
Q

Git remote

A

Manages the set of connected remote repositories