-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
21 lines (15 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
What happens when you initialize a repository? Why do you need to do it?
-It creates the .git hidden file that turns the repository into a git repository. If you don't do it, your directory will not become a git repository.
How is the staging area different from the working directory and the repository? What value do you think it offers?
-The staging area allows a commit to be built prior to actually performing the commit. It is beneficial because you can change your commit and its message prior to actually committing it.
How can you use the staging area to make sure you have one commit per logical change?
-You can check out the difference between the staging area and the commit. If the staging area shows more than 1 logical difference then we know we can split it into two different commits.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
-Branches would help when trying an experimental change in the code without having to worry about being able to revert back to an old version.
How do the diagrams help you visualize the branch structure?
-They allow me to see which commits will be visible from each branch, and which commits may be unreachable from other branches as well.
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 allows us to combine code once features or changes are accepted without missing out on anyone elses changes. It also allows us to keep a history of what commits were made and when. We represent them in the diagram with an arrow to a parent because each commit comes from a parent, and when two branches merge they will technically have two parents.
What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
-Pros -> Not having to manually add each change from branch to branch.
Cons -> When there are conflicts, they may become hard to detect and modify.