-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
17 lines (12 loc) · 1.22 KB
/
lesson_2_reflections.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
What happens when you initialize a repository? Why do you need to do it?
You get a message "initialized empty git repository in..." You need to do this to set up git so that it can track changes in the directory.
How is the staging area different from the working directory and the repository? What value do you think it offers?
The staging area is where you place files you want to commit.
How can you use the staging area to make sure you have one commit per logical change?
You can use git diff to compare your working directory with the staging area, or git diff --staged to compare the staging area with the latest commit.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
It's helpful when working on new features or bugs in your project. Doing this keeps the master branch clean and remaining functional.
How do the diagrams help you visualize the branch structure?
It shows how commits have parents, and that different branches will have different commit logs.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
The result is a commit of a combined version that contains both of the code from the branches.