INSPECT & COMPARE Flashcards

Git Commands

1
Q

show the commit history for the currently active branch

A

git log

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

show the commits on branchA that are not on branchB

A

git log branchB..branchA

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

show the commits that changed file, even across renames

A

git log –follow [file]

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

show the diff of what is in branchA that is not in branchB

A

git diff branchB…branchA

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

show any object in Git in human-readable format

A

git show [SHA]

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