-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
32 lines (19 loc) · 1.66 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
What happens when you initialize a repository? Why do you need to do it?
When I initialized a repository git created a new folder named .git/. It does that to store informations about the new repository.
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 from working directory because it just contains the files you want to commit and is different from the repository because it is offline and contains just the files you want to commit, that is just a part of the repository.
How can you use the staging area to make sure you have one commit per logical
change?
By using git diff, you can review your changes, and see if you have changed just one logical change or if you even have changed some. If you haven't, run git reset and just commit one logical change.
What are some situations when branches would be helpful in keeping your history
organized? How would branches help?
When I have many versions of a code, and each does something different that I want to access easyly. In that case, branches would help by separating by the names of each of these versions.
How do the diagrams help you visualize the branch structure?
It helps to see what commits the branches have in common.
What is the result of merging two branches together? Why do we represent it in
the diagram the way we do?
The result is mixing the code so we have one code with the changes of both branches in one commit.
What are the pros and cons of Git’s automatic merging vs. always doing merges
manually?
The pros of Git's automatic merging is save time and work, and the con is a possibility of errors.