-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_3_reflections.txt
47 lines (42 loc) · 3.52 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
When would you want to use a remote repository rather than keeping all your work local?
Following are the scenarios when I would want to use a remote repository:
1. If I am working on a project in a team, it is required to keep the repository at a location where
everyone in the team can access and contribute to the project. This is only possible with a remote
repository. If we work on our local repositories features added or changes made by other members
will not be reflected in mine and vice versa and everyone will end up having different versions of
the same project.
2. If I want to share my work with the public so that they can use it in their projects or learn
from my work or even contribute to better my solution/code.
3. When I want to take a backup of my code. Dropbox or google drive can come handy but Github is
specially made for coding and hence the files will be stored in a format where if I loose my
local repo, I can clone the github repo and use it as I would use normally without any overheads
of copy pasting anywhere.
Why might you want to always pull changes manually rather than having Git automatically stay up-to-date with your remote repository?
I want to pull changes manually from remote repository because, many people can
possibly make different changes on different branches on the remote repository.
That might include the same files I am modifying sometimes, but a different part
of it. Now, while I am working git suddenly syncs with the newly added/modifed
files onto my local repo, everything will become haphazard and un-organized and I
may also loose my current code if i have not commited them as the master now has
changed and the file that I modifying also changed in between. My code may not
compile. Only once I am sure with the my code and teh Github repo changes and
make sure no unneccasry changes are happening to the project on my local, I will
want to pull the Github repo.
Describe the differences between forks, clones, and branches. When would you use one instead of another?
Cloning is basically copying a repository that is on Github to your computer to have
a local copy of that Github repository or copying a local repository on one PC to
another PC to store it as a local repository on it. Forking is basically creating a
copy of an available github repository (somebody else's) to your own Github account on github
servers itself and not locally copying it on your PC. Branching is basically
creating different commit labels on your local repository/Github repository.
These branches basically are connected to the master branch but perform a
different logical change to the whole project which is experimental and have their
own individual commit history through the branch name.
I will use forking when I want to work on a project already on github and share my
changes to it when i dont have permission to change the original code of that repo. Also, as
forks will be linked to the orginal repo, I give credit to the original owner. And without
forking a lot of work needs to be done, if I am working in a team.(clone,push to my repo, team member
clone form my repo, set my repo as remote) When I want to work on a repository that I have
access and have to code on my local PC and cannot make changes on github directly
i will use cloning. Branching i will use when i am trying out an experimental
feature but i dont want to damage the original working project until I am sure.