-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlesson-2-reflection-prompts.txt
More file actions
53 lines (23 loc) · 1.9 KB
/
Copy pathlesson-2-reflection-prompts.txt
File metadata and controls
53 lines (23 loc) · 1.9 KB
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
45
46
47
48
49
50
51
52
53
What happens when you initialize a repository? Why do you need to do it?
When I initialize a repository, a folder I work with becomes a git repository.
I need to do this, so that I can track the changes of the files with git log.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
The stating area is a prep area. If I change my mind and don't want to commit a file
to the repository anymore, I remove the file. Also, I can add more files, if I want.
How can you use the staging area to make sure you have one commit per logical
change?
I can compare the files in the staging area either to the files in the working directory
or the files in the repository. This way I can check the exact changes I made
before committing the file.
What are some situations when branches would be helpful in keeping your history
organized? How would branches help?
Branches are useful, when I want to experiment on the code or add a new feature without modifying the master branch. Later, when the changes in the new branches are finalized, they can be merged into the master branch.
How do the diagrams help you visualize the branch structure?
The diagrams helps to see how branches are related to each other. It helps to understand how to avoid commits which cannot be tracked.
What is the result of merging two branches together? Why do we represent it in
the diagram the way we do?
The result of merging two branches is an updated master branch. The graph represents that the master branch after the merge will include all the commits of the two merged branches.
What are the pros and cons of Git's automatic merging vs. always doing merges
manually?
It is great the git merges files automatically when no conflict is detected. However, it is better to decide on my own in case of a conflict. Git cannot know what the intention of two different changes had been.