-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
29 lines (16 loc) · 2.12 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
*** What happens when you initialize a repository? Why do you need to do it?
It sets up the directory to act as a repository including the hidden .git file that controls versioning information. Without this, we won't be able to run source control on our directory.
*** How is the staging area different from the working directory and the repository? What value do you think it offers?
It is a cached memory version of the files to be commited whereas the repository is data about the file states at various points and the working directory is the file state on disk.
It is valuable as an intermediary stage where you can submit some changes to some files to the repository and not the entire working directory. This allows you to make logical submissions.
*** How can you use the staging area to make sure you have one commit per logical change?
Only add those files to the staging area which you wish to have changed.
*** What are some situations when branches would be helpful in keeping your history organized? How would branches help?
Experimental features: Experiment will not mess with master branch and can be safely iterated on.
Bug fixes: Can be tested to ensure that they actually fix the bug and don't introduce unexpected bugs.
*** How do the diagrams help you visualize the branch structure?
They allow me to more easily see which branches know about which commits and which commits are unreachable.
*** What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
Merging two branches together results in all the child changes from both branches being represented in the merged branch. It is represented in the diagram to make it clear which changes will actually exist within the branch. Side note: The changes in the log are represented in timestamp order.
*** What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
Automatic merges save time when Git can reasonably determine what the intent of the merge is. It also prevents human error. Manual merges allow the user to take control of the merge, but Git helps by indicating where it could not resolve a conflict.