-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
29 lines (24 loc) · 1.78 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
Reflect: Initializing a Repository
What happens when you initialize a repository? Why do you need to do it?
* Git creates a hidden folder <.git> with its own files in it.
So this hidden folder contains the metadata about the repository.
* I guess it's to get git to prepare for keeping the history of the repository.
Reflect: Staging Area
How is the staging area different from the working directory and the repository? What value do you think it offers?
* It is different in that it a conceptual stage between the repository and commits.
it is some kind of cache stage for commits. one puts files in it before commiting.
Reflect: Commit Size
How can you use the staging area to make sure you have one commit per logical change?
* I could use <git diff> to get the changes between the working directory and the staging area.
or i could use use <git diff --staged> to see differences between my changes and the last commit, if i've added the changes to the staging area.
This would help me see the changes and help decide if they are enough for a commit.
Reflect: When to Use Branches
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
* If i wanted to make huge changes to my code. Especially a change that seems like a redesign of the program.
This is also helpful in making experimental changes that are big. Branching makes sure to not affect the master.
Reflect: Visualizing with Diagrams
How do the diagrams help you visualize the branch structure?
* They show where branches happened along the structure.
Reflect: Merging Two Branches
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
* The changes of the two branches are merged and one branch is obtained, which reflects the result.