-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_3_reflections.txt
25 lines (14 loc) · 3.11 KB
/
lesson_3_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
When would you want to use a remote repository rather than keeping all your work local?
Using a remote repository would be useful when working on another computer or having collaborators on the same project.
Why might you want to always pull changes manually rather than having Git automatically stay up-to-date with your remote repository?
If there are some changes in the remote repository that I do not agree with, then it would be better to pull changes manually. For example, if a collaborator changed or deleted one of my files and I'm not in agreement to that, then having Git automatically update my local repo will delete my file. So it would be better to pull manually.
Describe the differences between forks, clones, and branches. When would you use one instead of another?
Forks: when making a copy of a repository on Github onto your own Github. Useful when you want to copy someone else's repo to make your own changes but not affect the original repo of the author.
Clones: when making a copy of a repository on Github onto your local machine. Useful when you want to continue working on something while at the same time sharing it to the public.
Branches: when making experimental changes that will be different from the master branch or are intended not to alter the master branch. Useful when playing around with code or trying something new without worrying that the original work will be altered.
What is the benefit of having a copy of the last known state of the remote stored locally?
It is useful when there are collaborators that make changes to the Github repository. When those kinds of changes are made, it will not be reflected in the local repository until a pull is done. Hence, having a copy of the last known state of the remote is useful because conflicts can be identified.
How would you collaborate without using Git or GitHub? What would be easier, and what would be harder?
If I were to collaborate without using Git or GitHub, I would physically sit down with the collaborator and go through the same code. We would code together and run ideas through each other while working on the same file. This would be easier to communicate and run ideas by each other, however, it may be slow and time consuming since we would have to always agree on a time to meet up. With Git or GitHub, each one of us could work on our own first and then collaborate once we're done introducing our respective features or changes.
When would you want to make changes in a separate branch rather than directly in master? What benefits does each approach have?
I would want to make changes in a separate branch if I'm still testing out something and I may want to collaborate or get other people's feedback on my work. This way, I won't be changing anything in the master branch that is already working. The benefits of working on a separate branch is that I can take riskier steps in experimentation without worrying that it will affect my already working code in the master. However, making changes directly in master are beneficial when I want to consider the work of collaborators and include that in my experimental branch, such as in a pull request.