-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
39 lines (25 loc) · 1.94 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
39
What happens when you initialize a repository? Why do you need to do it?
It creates a .git directory in your file in which it will keep the history of all the future commits.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
staging area is a temporary state that shows you the changes that you will be commiting to the git repository from the working repo. It allow you more control over the changes that you will be committing.
How can you use the staging area to make sure you have one commit per logical change?
We can add files that we want to commit at one time to the staging area and commit those changes. This allows us more control of our commit history.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
Branches are helpful when you want to introduce a new stream of changes to your coding pipline and want it to be kept seperate from your main development line. In this way you can keep on developing your branches and main stream seperately without having to worry about mixing up teh changes.
How do the diagrams help you visualize the branch structure?
Diagrams show us our git log in form of a tree and thus it is helpful in visualizing the structure of our commit history.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
Merging two branches combines the changes in the latest versions of the commits present in both the commits. In the diagram, a meerge is represented as a single joint in a tree where both the branches converge. The reason it is depicted likewise is because the merge operation simply does the same thing.
What are the pros and cons of Git's automatic merging vs. always doing merges
manually?
Manula merging:
-- pros:
time consuming
-- cons:
might result in better merging
Automatic merging:
-- pros:
quick
-- cons:
might result in errors.