STAGE & SNAPSHOT Working with snapshots and the Git staging area Flashcards

Learn git command

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

Show modified files in working directory, staged for your next commit

A

git status

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

Add a file as it looks now to your next commit (stage)

A

git add [file]

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

Un-stage a file while retaining the changes in working directory (undo the commit)

A

git reset [file]

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

diff of what is changed but not staged (compare files with revisions)

A

git diff

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

diff of what is staged but not yet commited

A

git diff –staged

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

commit your staged content as a new commit snapshot

A

git commit -m “[descriptive message]”

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