-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_3_reflections.txt
57 lines (42 loc) · 3.94 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
*** When would you want to use a remote respository rather than keeping all your work local?
The benefit of a remote respository is it creates a back up of your work and allows others to more easily collaborate with you and vice versa.
*** Why might you want to always pull changes manually rather than having Git automatically stay up-to-date with your remote repository?
You may end up accepting changes that don't work with what you've written. Manual merges allow you to assess the merging of the content when you're ready to make the next commit of meaningful work.
*** Describe the differences between forks, clones, and branches. When would you use one instead of another?
Forks allow the user to modify another user's code base without actually editing their repository. It also gives them credit because the fork knows where it was forked from and broadcasts that.
Clones allow the user to modify another user's code base without actually editing their repository. However, git has no knowledge of where it came from, so you aren't giving the originator credit nor are you able to easily integrate their future changes into your repository.
Branches are copies of a code base within a repository. In this case, you are directly editing the respository, rather than a copy of it.
*** What is the benefit of having a copy of the last known state of the remote stored locally?
You can work offline as if working with the remote. However, when you are back online, you will need to make sure you resolve any conflicts that happened in the meantime.
*** How would you collaborate without using Git or GitHub? What would be easier, and what would be harder?
We would have to manually pass files around or use a common shared location to edit in. It would be easier in that there would be less overhead and fewer manual processes. It would be harder to actually track changes and to review each others' work.
*** 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 master means you don't have to deal with merging as much and the overhead of maintaining separate branches. However, if you are working on dangerous code, you want to make sure that you are isolating the master branch from those changes so they can be properly reviewed. Working directly in master is also not ideal for collaboration since everyone will be trying to work on the same code out of the same branch instead of being forced to resolve their changes outside of the branch.
??? Not a reflection, but here's what I did on the final lesson to set up a remote directly to the source repository so that my master would stay in sync with the source repository.
Jeremiah (master) english $ git remote -v
origin https://github.com/dostjh/create-your-own-adventure (fetch)
origin https://github.com/dostjh/create-your-own-adventure (push)
Jeremiah (master) english $ git remote add upstream https://github.com/udacity/create-your-own-adventure
Jeremiah (master) english $ git remote -v
origin https://github.com/dostjh/create-your-own-adventure (fetch)
origin https://github.com/dostjh/create-your-own-adventure (push)
upstream https://github.com/udacity/create-your-own-adventure (fetch)
upstream https://github.com/udacity/create-your-own-adventure (push)
Jeremiah (master) english $ git pull upstream master
From https://github.com/udacity/create-your-own-adventure
* branch master -> FETCH_HEAD
* [new branch] master -> upstream/master
Already up-to-date.
Jeremiah (master) english $ git merge master uda
Updating e69545c..73b765e
Fast-forward
english/marshmallow.md | 2 +-
english/wisely/wisely.md | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 english/wisely/wisely.md
Jeremiah (master) english $ git push origin uda
Everything up-to-date
Jeremiah (master) english $ git checkout uda
Switched to branch 'uda'
Jeremiah (uda) english $ git merge master uda
Already up-to-date.