-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_2_reflections.txt
27 lines (18 loc) · 1.54 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
What happens when you initialize a repository? Why do you need to do it?
The meaning of initialize is nothing but we are creating a repository with git init
and if we want to add a brand new repository we have to use git init.
How is the staging area different from the working directory and the repository?
What value do you think it offers?
Staging area is the intermediate state btween the working directory and repository.
If we create a repo and there are files that we want to commit the, first the files are added to the
staging area i.e, any number of files we want to commit via git add <file_name>.
Then after that when we hit git commit, the files which are in the staging area, will be committed. For ex,
If there is one file -> one, if there is two files -> two. So, this is how the staging area works!
How do the diagrams help you visualize the branch structure?
By visualizing the branch structure, we can better understand the reachability of all the commits made
to the particular branches and also we can be aware of the unreachable commits from any of the branches.
What is the result of merging two branches together? Why do we represent it in the diagram the way we do?
I dont know, i cant merge the branches because it says "Your branch is ahead of 'origin/master' by 1 commit".
What are the pros and cons of Git’s automatic merging vs. always doing merges manually?
Automatic merging is good in the cases where any two users have not changed similar lines of code, and if we
try to do so we'll get an error and we have to do manual merging.