Basic Git snapshotting Flashcards

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

How do you add all changes from a subdirectory?

A

git add –all :/ or git add -A :/

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

How do you remove a file from the staging area, but leave the working directory unchanged?

A

git reset file

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

How do you remove a file with Git?

A

git rm file

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

How do you stop tracking a file without removing it?

A

**git rm –cached **file

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

How do you undo the last 2 commits and changes?

A

git reset –hard HEAD^^

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

How do you unstage a file from the index?

A

**git reset **file

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

How do you reset the staging area to match the most recent commit, but leaving the working directory unchanged?

A

git reset

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