-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_1_reflections.txt
49 lines (12 loc) · 1.99 KB
/
lesson_1_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
How did viewing a diff between two versions of a file help you see the bug that was introduced?
Well, diff command helps us to find differences between two codes, and it makes easier to find typos, since it will show the old version line followed by the new line.
How could having easy access to the entire history of a file make you a more efficient programmer in the long term?
If you are in a project tha will last only a few days, it might not be very useful to use version control for that project, but if the project will last months or even years, then it surely will be useful to use version control, thus you can fix any problem just by undoing the change.
What do you think are the pros and cons of manually choosing when to create a commit, like you do in Git, vs having versions automatically saved, like Google Docs does?
The pros in manually saving are that you have a better control of what exactly are the changes that you made on that file and writte commites to explain them. The cons is that you might forget to save a change or even lost a a file.
Why do you think some version control systems, like Git, allow saving multiple files in one commit, while others, like Google Docs, treat each file separately?
I think that it is because Git is usually used for project management, so it is very willing that you might want to change different parts of a project in a single commit, while Google Docs is used mainly for common people, that writtes a doccument or even a papper, so there is not a big purpose in saving more than one doc at once.
How can you use the commands git log and git diff to view the history of files?
By typing git log, we see all the commits with it's ids, and by typing git diff followed by two ids, we see the difference between these files.
How might using version control make you more confident to make changes that could break something?
If the change breaks something you just need to checkout the older version and everything will be ok again.