-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
38 lines (19 loc) · 1.58 KB
/
lesson_2_reflections.txt
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
Q: What happens when you initialize a repository? Why do you need to do it?
A: When we initialize a git repository, a .git directory is created which stores all the meta data
which keeps track of the history of files in the repository.
We need to initialize a repository so that we can track changes made to the files in repo,
and hence use version control.
Q: How is the staging area different from the working directory and the repository? What value do you think it offers?
A: 3 different stages of control.
Q: How can you use the staging area to make sure you have one commit per logical change?
A: Only stage files involved in that logical change. And commit them.
Q: What are some situations when branches would be helpful in keeping your history organized? How would branches help?
A: Branches are helpful we want want to try out some experimental changes while keeping our working branch intact.
Q: How do the diagrams help you visualize the branch structure?
A: Diagrams of commits with arrows helps us visualize how each commit knows about it's parent but not child.
Q: What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
A: On merging the new resultant branch is expected to have features of both the branches.
Because it merge commit has 2 parents and hence it remembers about both of them.
Q: What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
A: Con is that some times it detects pretty obvious differences as conflicts.
Pro is that it gives us more control to see and manage conflicts ourselves.