This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
39 lines (28 loc) · 1.73 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
Q: What happens when you initialize a repository? Why do you need to do it?
A: It informs get that this directory (and subdirs) are a repo to watch,
and it adds the .git folder into the directory to prepare to track.
Q: How is the staging area different from the working directory and
the repository? What value do you think it offers?
A: Much like taking two steps to commit a change into an SQL database,
the staging area pulls pieces together, then requires a commit to ensure
you have a chance to validate your intended results before you commit them.
Q: How can you use the staging area to make sure you have one
commit per logical change?
A: You can diff your staged files against your last commmit to verify that you
have only made one logical change since the last commit.
Q: What are some situations when branches would be helpful in keeping
your history organized? How would branches help?
A: As mentioned in the video, adding a second language is a valid reason
to branch, as also testing an experimental new feature, or attempting
a total refactoring of the code to streamline it and make it
faster/more efficient.
Q: How do the diagrams help you visualize the branch structure?
A: The diagrams really help understand the flow of the main line of commits,
and show how the branches come off of those and feed into a log. They
also do a great job explaining why you get the headless messages when you
check out an old commit.
Q: What are the pros and cons of Git’s automatic merging vs. always doing
merges manually?
A: Pros include the automatic handling of changes/adds/deletes that makes
sense in both branches. Cons include a little more work to find and resolve
conflicts that can't be handled automatically.