-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_3_reflections.txt
49 lines (38 loc) · 2.39 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
When would you want to use a remote repository rather than keeping all your work
local?
When I want to share my repository with other people, be it publicly or privately.
Also, I might want to do it to have a remote backup, in case my local repo is lost
for some reason: hard drive failure, human error, theft, etc.
Why might you want to always pull changes manually rather than having Git
automatically stay up-to-date with your remote repository?
Because I might not be ready to receive changes at random moments. I might
want to have a work unit completed and commited before I want to pull
new code or changes to code.
Describe the differences between forks, clones, and branches. When would you
use one instead of another?
Fork: when I want to extend or modify a existing project, and then publish
it without having my changes pushed to the original repository.
Clone: when I want to contribute changes to the original repository.
Branches: when I start a new unit of work in a project.
What is the benefit of having a copy of the last known state of the remote
stored locally?
Running git fetch origin, allows me to review changes that have been pushed
since I last pulled. I can then decide offline what I want to do. After
that, the local copy allows me to work offline, making changes and merging
branches if necessary.
How would you collaborate without using Git or GitHub? What would be easier,
and what would be harder?
My work happens on dedicated branches. When the work is done and is ready
to be merged into master, I can do it myself using git. But if I want
someone else to review it first, make suggestions on just share knowledge,
I would create a pull request.
When would you want to make changes in a separate branch rather than directly in
master? What benefits does each approach have?
Doing work on a branch has the advantage of isolating my work from changes
being made by others, or by me, on master or other branches. This also means
that I can push to the remote and not break master while my changes are
still incomplete. In addition, working on branches allows creating pull
requests to collaborate with others.
Doing work directly on master is much simpler and involves less operations
and overhead. If I am working alone and I just want to make a small change,
I might do it directly on master.