forked from cbuckey-uda/reflections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_3_reflections.txt
69 lines (56 loc) · 3.78 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
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?
My most common use of remote repositories is when I'm collaborating with
other people on a project. I also use them when I want to share my code
with someone, even if they just want to see my code and not contribute to
it. I also sometimes use them when I want to be able to edit code from
multiple different computers and keep the code up-to-date on all the
computers. Also, remotes can be a good way to keep a backup of my work.
Why might you want to always pull changes manually rather than having Git
automatically stay up-to-date with your remote repository?
I like pulling changes manually because that way, when I'm working on code,
it doesn't change without me expecting it. For example, if I know the new
version of some code is broken, I might not want to pull that change until I
the bug is fixed.
Describe the differences between forks, clones, and branches. When would you
use one instead of another?
Forks, clones, and branches are all ways to add new changes without
affecting the existing version. With branches the new changes are added in
the same repository. Forking and cloning both copy an entire repository to
a new location. The difference between forking and cloning is that forking
is a special construct made by GitHub. You can only fork a GitHub
repository to another location on GitHub, while you can clone any Git
repository to anywhere you have access to.
I use branching for most cases where I want to add new changes to a
repository while keeping an easy reference to a previous version, especially
when collaborating with other people. I clone a repository on GitHub when I
want to work on that repository locally rather than using the GitHub
website. I fork a repository on GitHub when I want to make changes to that
repository public, but I don't have permission to modify the original.
What is the benefit of having a copy of the last known state of the remote
stored locally?
If I am about to go without Internet access for a while, for example to work
on a plane, I can update my local copy before I leave. I can do this even
if I'm not ready to merge those changes into my own branches yet. Then if I
want, I can perform the merge while offline, or I need to know what the
remote version is at some point, I have an easy way to access it.
How would you collaborate without using Git or GitHub? What would be easier,
and what would be harder?
If I had to collaborate on a coding project without using Git or GitHub (or
any other form of version control designed for code), I might suggest that
we all make changes to a shared folder, for example, a DropBox folder. This
would be a ligter-weight solution than using Git and GitHub. However, if we
both wanted to work on the same part of the file, it would be very difficult
to avoid clobbering each other's changes.
Real-time collaborative editors like Google Docs are also great for
collaboration, but I don't know a good version of Google Docs for code.
Even if I did, I would be hesitant to use this approach on code that it's
important to keep bug-free. I would be worried that someone else would add
a change that combined with my change to make a bug, and I might not even
notice their change!
When would you want to make changes in a separate branch rather than directly in
master? What benefits does each approach have?
I tend to work directly in master more often when I'm working on my own or
with just one or two other people. When working with a large group, though,
using branches to keep track of which changes have already been reviewed and
approved is extremely helpful.