-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
27 lines (14 loc) · 2.21 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
Q What happens when you initialize a repository? Why do you need to do it?
A It creates a .git hidden file and allows you to make commits and use Git
Q How is the staging area different from the working directory and the repository? What value do you think it offers?
A It is an inbetween place where you can store your changed versions without committing to a commit, it also allows you to place several files in the staging area so that all files can be committed at the same time
Q How can you use the staging area to make sure you have one commit per logical change?
A The staging area allows for files to be prepared for a commit, you can make changes logical changes to the files and add them to the staging area before committing.
Q What are some situations when branches would be helpful in keeping your history organized? How would branches help?
A Branches allow a main master copy of the file to remain, and other branches allow you to change and adapt the file without affecting the main branch. You could make different versions or try new pieces of code all without worrying about affecting the main code.
Q How do the diagrams help you visualize the branch structure?
A It gives a visual representation of what is going on with the differing branches in relation to the master. It also allows you to remember and trace commits that are detached
Q What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
A Merging two branches incoportates two different versions of a file into one, and allows two different people to work on one file. We represent it in the diagram as two branches combining into the master, whilst retaining each branche's commits to give a clear visual on what has happened and where changes were made prior to the merge.
W What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
A Pros of auto merging are time saving and avoid having to trawl through thousands of lines of code. Cons are that machines make mistakes and those mistakes are not always traceable. Pros of manual merging is you are always in control and can completely control what happens and how, cons are that it takes a lot of time and human error still exists.