-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
28 lines (15 loc) · 1.7 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
What happens when you initialize a repository? Why do you need to do it?
Git puts in a hidden folder to track changes to the files in that directory. It does not do a commit when it initializes. That has to be done manually.
How is the staging area different from the working directory and the repository? What value do you think it offers?
The working directory has all files in it, not just ones for git. The staging area has only the files ready for commit, so you can choose what is committed? I'm not sure what value that has.
How can you use the staging area to make sure you have one commit per logical change?
I can git add to add the file for the commit. Then git diff --staged to see what will be committed.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
When two people want to work on different ways to accomplish the same goal, each could check out their own branch and compare which works as intended. All the while the master is still functional.
How do diagrams help you visualize the branch structure?
They, um, visualize it- make it visible? It's easier to track which branches connect to which and where they diverge from the master.
What is the result of merging two branches together? Why do we represent it in the diagram the way that we do?
The result is a file that has parts of both files. It preserves the commit history of both branches.
What are the pros and cons of Git's automatic merging vs. always doing merges manually?
Auto: can figure out lots of diff quickly, highlights conflicts, ensures nothing is missed
Manual: can logically reason out conflicts in code, slow and more intentional, won't drop things you want in there