-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_3_reflections.txt
43 lines (30 loc) · 3.07 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
1. When would you want to create a remote repository rather than keeping all you work local?
If I were collaborating with others or if I had to do my work on different computers then I would want
to create a remote repository. If someone made an acceptable change then I could pull that change and continue
my work. If I made a change on one computer but then had to switch to another one later I could push a
commit to the remote repository, then pull that commit to another computer and continue working from there.
2. Why might you want to always pull changes manually rather than having Git automatically stay up-to-date with your remote repository?
If you're collaborating with others you may not always want their changes on your local repository
yet. Say you're working on a file, take a break, and a contributor pushes a change. If Git pulled the
changes automatically, you might get confused or not even notice that your file was modified. That
could lead to some headaches as you try to resume your work.
3. Describe the differences between forks, clones, and branches. When would you use one instead of another?
Forks are used when you want to modify someone else's work but you don't have persmission
to make changes to their repository. You may also want to make your own version of their
work that you want to share with others. Forking copies the code as it is from one repo
to your repo. It is all done on the server, not on your local machine.
Clones are used to copy repos from a git server (or fromt another directory on your computer) to a directory on a computer. It automatically creates a remote to the remote repo on Github. If you want
to edit files on your computer rather than on Github then you would use clone.
Branching is done all on one repo. If you want to add a new feature or experimental changes
that might take awhile to implement you would use branches to create different versions of
your work.
4. What is the benefit of having a copy of the last known state of the remote stored locally?
This allows you to review the changes anyone else has made before you incorporate those into your local repo.
5. How would you collaborate without using Git or GitHub? What would be easier, and what would be harder?
I guess I could colloborate in person. I could have regular meetings for few hours and hammer out
some code. Feedback and decision making would probably be quick. It might be difficult to do if
my collaboraters lived far from me and/or had different schedules.
6. When would you want to make changes in a separate branch rather than directly in master? What benefits does each approach have?
If you want to add a new feature or try something experimental then you should probably make those
changes in a branch so you don't end up breaking the master. Using a branch gives you time to test
out bugs without affecting development of the main portion of the code. Working directly on master makes collaborating a little less complicated and more conventient though since dealing with pull requests on a branch involves more steps.