-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
38 lines (24 loc) · 1.72 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
What happens when you initialize a repository? Why do you need to do it?
Git adds hidden system files that start with a period to help git track commits.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
The staging area is the temp directory where files to be committed to the repository are moved. The value of the staging area is that it allows one to keep track of which files one wants to commit before commiting them.
How can you use the staging area to make sure you have one commit per logical
change?
By making sure that all changes associated with the logical change are in the staging area before committing.
What are some situations when branches would be helpful in keeping your history
organized? How would branches help?
Branches could be helpful when:
(1) Doing experimental changes
(2) Handling one-offs
(3) Working on demos/prototypes
Branches help in that they keep logical groupings of code together without impacting the main branch. This is expecially helpful if multiple people are working off the main branch.
How do the diagrams help you visualize the branch structure?
It's much easier to see and faster understand a visual graph branch structure than to read text.
What is the result of merging two branches together? Why do we represent it in
the diagram the way we do?
A combing of all changes (++++ and ----) between multiple branches into a new commit.
What are the pros and cons of Git's automatic merging vs. always doing merges
manually?
Pros = saves time, is easy to do, relatively "smart" on what it automatically merges.
Cons = could occasionally be wrong. Doesn't auto merge everything. Still have to manually handle conflicts.