-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit_03_MergeAndRebase.yaml
49 lines (48 loc) · 2.55 KB
/
git_03_MergeAndRebase.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
categoryId: 4710 # CATEGORY NAME
name: Integration of changes via merge, rebase and other tools
questions:
- description: What is meant with merge?
choices:
- It is the process of creating a new commit
- Merge enables you to combine the changes which were created on different branches or commits
- It is what happens after the git reset command
-
hint:
explanation: You can merge based on branches, tags or commits. Other ways are using rebase or cherry-pick.
correctChoice: 1
- description: Which merges can git handle without user interaction?
choices:
- All merge conflicts. Git knows what is right and wrong
- Git always handles merge conflicts itself
- Only if changes are done in different files
- If changes are done in different files or in the same files but in different locations
hint:
explanation: Git doesn't know which change is right if the change affects the same location.
correctChoice: 3
- description: Does git show merge conflicts which can not be solved automatically?
choices:
- Yes, git marks the conflicts in the affected files
- No, you have to search them manually
-
-
hint:
explanation: Even though git can not solve all merge conflicts, the conflicts are marked in all respective files.
correctChoice: 0
- description: What is the difference btw. merge and rebase?
choices:
- There is no difference at all as the working tree looks the same
- The final result for the source code is the same, but the rebase operation moves the changes onto another commit as if these changes started from this commit
- With rebase git solves all merge conficts itself
- Using rebase should be avoided as you lose the information how the branches was integrated
hint: Same but different.
explanation: Rebase moves the work done in one branch or commit onto the changes done in another branch. This results in less merge commits and a linear history.
correctChoice: 1
- description: What is the cherry-pick command used for?
choices:
- To select individual changes created by commits and apply the same changes onto another commit
- To select the commit with the best description
- To delete wrong commits
-
hint: Just get the best of a branch
explanation: The git cherry-pick command allows you to select the changes which was introduced with an individual commit and apply these changes on another branch. This is captured as a new commit on the other branch.
correctChoice: 0