Udacity lesson 3 Flashcards

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

display information about the existing commits

A

with cd situate bash in a directory with a repo

git log

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

display information about a given commit

A

git show

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

“scroll” through the log to see more updates

A

j or ↓ to move down one line at a time

d to move by half the page screen

f to move by a whole page screen

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

quit the “pager”

A

q

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

scroll up in Less

A

k or ↑ to move _up_ one line at a time

u to move by half the page screen

b to move by a whole page screen

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

how to adjust what a command on the command line will do?

A

use a flag

ls -l

  • here -l is a flag
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how to make the git log output shorter?

A

use the flag –oneline

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

I want to know which files were changed in the commit. what to do?

A

git log –stat

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

what do the numbers mean?

A

number of lines changed (insertion or delition in the line)

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

I want to see what exactly the changes in each commit were. How to do that?

A

git log -p

or –patch, it’s the same

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

what does this all mean?

A

diff: difference between the original and the changed versions of the file

a and b are for the first and the second versions of the file. The file is .css, it’s written there

index: the hash of the file before the change and after the change

@@ shows where in the file the edits were made: first what were the lines in the original file (the sequence began at line 38 and lasted 6 lines), the second one - where the lines are in the edited file (begins at 38, lasts 11 lines)

lines in green and with + mean these lines were the actual change, they were added

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

only look at the specific commit, not on all the commits

A

git log -whatever_flag first_7_characters_of_SHA

but will show all the commits before this one too

or

git show _flag first_7_characters_of_SHA

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