-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson_1_reflections.txt
21 lines (15 loc) · 1.23 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
How did viewing a diff between two versions of a file help you see the bug that was introduced?
Doing so helped by automating the process and making it precise. Automation is handy for larger files, and the
precision is nice because humans have a hard time catching small mistakes.
How could having easy access to the entire history of a file make you a more efficient programmer in the long
term?
Often, I try something out and it doesn't end up working. With the full history of a file, I can easily go
back to before I tried that something out.
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?
Manually committing has the advantages of keeping a smaller commit history with "logical" changes bundled
together, while having the downside of user error - forgetting to make a commit.
How can you use the commands git log and git diff to view the history of files?
git log shows a log of all the commits to a repo. Add --stat to get some detailed stats, including how many
lines were changed. git diff shows a detailed view of changes between two commits. You can either use the
full commit id (long hash) or the first >=4 characters.