You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notes/2025-09-30.md
+42-4Lines changed: 42 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ So in broader context, the [git visual cheatsheet](https://ndpsoftware.com/git-c
163
163
+++{"lesson_part": "main","type":"heading"}
164
164
165
165
166
-
166
+
(setsofcommands)=
167
167
## Git has two sets of commands
168
168
169
169
- Porcelain: the user friendly VCS
@@ -191,13 +191,13 @@ a lot of programming is *designing* abstractions, to get good at making somethin
191
191
+++{"lesson_part": "main"}
192
192
193
193
194
-
We have so far used git as a version control system. A version control system, in general, will have operations like commit, push, pull, clone. These may work differently under the hood or be called different things, but those are what something needs to have in order to keep track of different versions.
194
+
We have so far used git as a version control system, using the {term}`porcelain` commands. A version control system, in general, will have operations like commit, push, pull, clone. These may work differently under the hood or be called different things, but those are what something needs to have in order to keep track of different versions.
195
195
196
196
197
197
198
198
+++{"lesson_part": "main"}
199
199
200
-
The plumbing commands reveal the *way* that git performs version control operations. This means, they implement the git file system operations for the git version control system.
200
+
The {term}`plumbing` commands reveal the *way* that git performs version control operations. This means, they implement the git file system operations for the git version control system.
201
201
202
202
203
203
+++{"lesson_part": "main"}
@@ -1070,4 +1070,42 @@ Append the contents of one of your trees or commits and one blob or tree inside
1070
1070
1071
1071
That is, paste the result of you tracing through your own repo.
1072
1072
1073
-
## Questions After Today's Class
1073
+
## Questions After Today's Class
1074
+
1075
+
1076
+
### How will we apply this information to the course?
1077
+
1078
+
Today we saw an example of how abstractions can work (or not quite work, since git is a leaky abstraction).
1079
+
1080
+
Seeing how git works *as* a file system also starts to build up your knowledge of what kinds of operations *any* file system needs to implement
1081
+
1082
+
### Is there a benefit to working with git at a lower level?
1083
+
1084
+
It is mostly helpful for understanding how git works so that you can understand how the more advanced features work, which can save you a lot of time.
1085
+
1086
+
We studied it primarily to see how *a* file system works.
1087
+
1088
+
It could, however, be useful if you were building a developer tool, or you wanted to contribute to git itself [see gitgitgadget for how](https://gitgitgadget.github.io/)
1089
+
1090
+
### Is it possible to check the oldest commit using cat .git/HEAD
1091
+
1092
+
You coudl trace backwards, like parsing through a linked list:
1093
+
- first `cat .git/HEAD`
1094
+
- then `cat` the file that tells you about
1095
+
- then use `git cat-file -p` on the hash from the file above
1096
+
- then use `git cat-file -p` hash of the parent commit
1097
+
- repeat above until there is no parent commit.
1098
+
1099
+
1100
+
### Can we configure Git to use a stronger hashing algorithm?
1101
+
1102
+
It looks like you can actually, from the [transition plan's detailed design](https://git-scm.com/docs/hash-function-transition#_detailed_design) that they have implemented it. However, it appears [github does not support that](https://github.com/orgs/community/discussions/12490), but [gitlab does at least partially](https://about.gitlab.com/blog/sha256-support-in-gitaly/)
1103
+
1104
+
::::::{attention}
1105
+
this is a good topic for an explore badge.
1106
+
::::::::
1107
+
1108
+
1109
+
### If we are seeing a command for the first time, how do we know if it is porcelain or plumbing?
1110
+
1111
+
You can use the [definitions](setsofcommands) and what the command does.
0 commit comments