-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
31 lines (17 loc) · 1.95 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
What happens when you initialize a repository? Why do you need to do it?
That just means that you are letting git know that you want to start an repo in that folder.
How is the staging area different from the working directory and the repository? What value do you think it offers?
The staging area give you the opportunity to see which file will be committed before actually running the commit command. The value is that you are less likely to mistakenly commit files to your repository.
How can you use the staging area to make sure you have one commit per logical change?
You can compare the staging area to the repository to ensure that you have one commit per logical change.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
Branched are good if you were to update the project to a new language or to try to implement a new experimental update while keeping the master copy of the software intact.
How do the diagrams help you visualize the branch structure?
Diagrams help by showing you the parent of each commit. They also allow you to see commits that are unreachable.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
When you merge 2 branches you are combining the code base. It is represented showing 2 parents because we do not want to lose any of the commits. It preserves the true history of the code base.
What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
The pros of automatic merging is that no conflicts were found and git is able to combine the code without your intervention.
The con of automatic merging would be files that dont make sense because git does not have the logic to decide which changes should be kept.
The pros of manual merging is that you know the context of the code and can make the best decision.
The cons of manual merging is that is takes longer to accomplish.