-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
44 lines (31 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
40
41
42
43
44
What happens when you initialize a repository? Why do you need to do it?
Git creates the .git directory in the working directory, which stores files
to manage the repository.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
It allows to copy files to it from the working directory, and then to make
commits, which stands for moving all its contents to the repository, with
some metadata. It offers the value of allowing to prepare commits in an
ordered manner.
How can you use the staging area to make sure you have one commit per logical
change?
You can do many logical changes in your working directory, but then only
stage one logical change at a time. And also, with "git diff --staged", you
can see the changes that you are about to commit, so you can verify if they
correspond to only one logical change.
What are some situations when branches would be helpful in keeping your history
organized? How would branches help?
When doing experimental tests. Branches help to make progress independently
in the master and experimental branches.
How do the diagrams help you visualize the branch structure?
They help me visualize the differences between the branches.
What is the result of merging two branches together? Why do we represent it in
the diagram the way we do?
A new commit is created, that has two parents, which are the former merged
branchs tips. Also, the tip of the current branch is changed to be that new
commit.
What are the pros and cons of Git's automatic merging vs. always doing merges
manually?
It saves time, but I think that it could lead to inconsistent code, for
example if person X deletes function A, and person Y adds code that uses
function A.