-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_3_reflection_prompts.txt
70 lines (56 loc) · 3.74 KB
/
lesson_3_reflection_prompts.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
When would you want to use a remote repository rather than keeping all your work
local?
You might want to use a remote repository when collaborating with other people
or working on the same project from different devices. You might also want to
publish your commits publically so strangers can pull/view/change your work.
Why might you want to always pull changes manually rather than having Git
automatically stay up-to-date with your remote repository?
Manual pulls might be preferable to automatic updates because you may be working
on some feature that has led to changes to local working directory that you want
to complete (and perhaps create a branch for), before dealing with potential
issues that result from the new commits on the remote when they are pulled.
Describe the differences between forks, clones, and branches. When would you use
one instead of another?
A branch is created as a new label for your commits, if you need to create a
non-linear commit history. Branches happen inside a single repository. While you
can push or pull branches, they are created inside a single repo. You might
create a branch for new features while maintaining a working copy on the master
branch.
A clone involves taking a repository and making another repository just like it.
The original repository could be remote, but it could also be local, if you want
to clone a repo from one place on your computer to another. You'd use a clone if
you want to collaborate with others, so they have access to your complete commit
history.
A fork is a clone of a repository on GitHub that is created completely on
GitHub, without first cloning it to your local device. Forks have references to
the original repository, so that the original work is attributed and it's easy
to make suggested changes to the original repository. You'd us a fork if you
don't have access to change a repository as a collaborator - so you'd make a
clone on GitHub and you can add your own changes to that fork.
What is the benefit of having a copy of the last known state of the remote
stored locally?
A local copy of the last known state of the remote is useful because if you are
working offline because you don't have internet access, or the remote's server
is down, you know how far the branch has advanced beyond the master. This saves
a lot of data overhead. Furthermore, when attempting to sync with a remote that
has changes and a local repository that has changes, it is easier to deal with
any merge conflicts locally, by comparing the local copy of the branch and the
local branch itself.
How would you collaborate without using Git or GitHub? What would be easier,
and what would be harder?
You could collaborate without using Git and GitHub by sending copies of your
files to your collaborators and manually scrolling through the files to find
conflicts. It would be harder because finding conflicts would be more difficult,
work might have to stall until merges were complete, you'd need to manually keep
logs of changes, come up with some alternative to inline comments of changed
files. The only possible way I can see it being easier than using GitHub is that
you aren't dependent on the website, should it ever be offline. Otherwise, Git
and GitHub seems like the more efficient workflow in every respect for
collaborating with others.
When would you want to make changes in a separate branch rather than directly
in master? What benefits does each approach have?
Making changes in a separate branch allows you to show them to collaborators
via pull requests, before they are committed to the master branch, which might
be maintained as a fully working version. However, this is slower than making
commits directly to the master branch, as it requires you to pull and push
branches, merge and fix conflicts.