Working with Git branches Flashcards

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

What’s the procedure of merging solution branch to main branch?

A

git checkout main
git merge solution

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

What’s “fast forward” merge?

A

A merge that happens when target branch doesn’t contain any new commits at the point in time when you want to merge from solution.

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

How to compare 2 branches?

A

git diff branch1 branch2

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

How to see current changes that haven’t been staged yet?

A

git diff

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

How to see just current changes that have been staged?

A

git diff –cached

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

How to see staged and unstaged current changes?

A

git diff HEAD

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

How to commit all changes using one line command?

A

git commit -am “message”

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

How to ignore whitespace changes when doing diff?

A

git diff -w

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

How to show the original content of a file when doing diff?

A

git show <hash></hash>

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