This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
43 lines (30 loc) · 2.34 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
40
41
42
43
What happens when you initialize a repository? Why do you need to do it?
It creates an empty Git repository. You need to run the command so that
Git knows that it should starting tracking version.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
The staging area is different in that it is a separate place that only
keeps track of things that you expect to or would like to change as opposed
to everything that exists within the repository. It allows us more control
what we think are valuable changes and what aren't.
How can you use the staging area to make sure you have one commit per logical change?
You can put only the files you want to change per commit in the staging area.
That way, even if more files were changed during the time period in question,
only the ones that you want to commit with this commit are actually committed.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
Branches are useful when you want to add new things to your code but also need to continue working
on the original code. That way, when you don't know if the new code will work or not yet, you can
experiment around while still maintaining and fixing bugs in the master branch until the new code is
ready to go.
How do the diagrams help you visualize the branch structure?
They are good to see reachability because they allow to you see where things split off
and what has been done since the branches split off.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
Creates a new branch from the 2 original branches that have the 2 original branches as parents.
We diagram it that way because it allows us to keep track of how the 2 branches developed
before the merge.
What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
It is great to be able to do this automatically so that you do not have to sift through
code changes each time. It definitely saves some time. But the cons are that you do
have to sift through changes if there is ambiguity. That also seems like a pro at times
though.