/
lesson_2_reflections.txt
35 lines (24 loc) · 1.94 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
What happens when you initialize a repository? Why do you need to do it?
New repository is initialised. .git file with some metadata is created.
Once repository is created I can add files to it to track. I will be able to track the changes, view previous versions. Other people will be able to use and submit there work to the same project.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
Repository holds a complete logical change at a time.
Working directory holds your work in process, possibly on multiple files.
Staging are allows you bundle up some files together as a one commit co complete a logical change.
As an exaple commmit at once cake and frosting recepies as a one commit vs commiting these files seporately.
How can you use the staging area to make sure you have one commit per logical
change?
You can add only the files that complete the logical change before commiting, then add more files for the next logical change if any.
How do diagrams help you visualize the branch structure?
Now I have a better understanding of what does 'detouched head' message mean and how to use branches to help retain changes to the code.
What are some situations when branches would be helpful in keeping your history
organized? How would branches help?
In case you want to experiment on a new feature while keeping the current working version intact yo uwould branch from the main directory and work on the experiment.
How do the diagrams help you visualize the branch structure?
What is the result of merging two branches together? Why do we represent it in
the diagram the way we do?
Looking at the diagram it is easy to understand that after merging git log will contain commits from the both branches.
What are the pros and cons of Git’s automatic merging vs. always doing merges
manually?
Pros. Less manual work is requared. The only manual input is needed is when it is a conflict between two branched