-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_2_reflections.txt
30 lines (17 loc) · 1.71 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
What happens when you initialize a repository? Why do you need to do it?
Git adds all the necessary scaffolding to track commits - if you don't do that, nothing will be tracked, dummy
How is the staging area different from the working directory and the repository? What value do you think it offers?
It doesn't represent a location on disk, more a collection of files that are held together, like a repo. But, they aren't yet bound together strongly.
It's a nice way of choosing what does and doesn't make it into the commit.
How can you use the staging area to make sure you have one commit per logical change?
Only stage files you know contain parts of that change, use diff to check no other changes are implemented, check that all files changed are staged.
What are some situations when branches would be helpful in keeping your history organized? How would branches help?
For experiments, stuff that might break usability, alternate versions of an app for different audiences and so on.
Keep the changes separate, so they don't interfere with the functional or production version that users should be on.
How do the diagrams help you visualize the branch structure?
Not hugely.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
Roll the changes from the branch referenced second into the one referenced first. Once that's done, the head of each is the same commit, so they are now the same.
What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
Git auto-commit is quick and simple, preserving simple changes.
Manual merges ensure that only the changes you specify will enter the branch, but takes some thought and time to work through.