Backtracking Flashcards

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

How do you see the head commit?

A

git show HEAD

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

If you want to discard a change to a file, how can you quickly make the file look exactly as it did when you last made a commit?

A

git checkout HEAD scene-5.txt

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

What command removes file changes from the staging area?

A

git reset scene-2.txt

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

How would you rewind to a commit before you made the wrong turn?

A

git reset commit_SHA

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

Whats a shortcut to add every files to the directory faster, rather than adding each one individually

A

git add .

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

How to delete a most recent commit, keeping the work you’ve done, and how to whereas deleting your work.

A

git reset –soft ~HEAD1

git reset –hard ~HEAD1

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