Git Flashcards

1
Q

What is git init

A

creates a new Git repository

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

What is git status

A

checks the contents of the working directory and staging area

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

What is git add

A

adds files from the working directory to the staging area

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

What is git diff

A

shows the difference between the working directory and the staging area

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

What is git commit

A

permanently stores file changes from the staging area in the repository

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

shows a list of all previous commits

A

git log

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

discards changes in the working directory

A

git checkout HEAD filename

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

unstages file changes in the staging area

A

git reset HEAD filename

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

resets to a previous commit in your commit history

A

git reset commit_SHA#

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

How do you add multiple files at once?

A

Example: git add filename_1 filename_2

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