summaryrefslogtreecommitdiff
path: root/docs/git/scratch.md
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2023-12-18 19:41:51 -0500
committerOwen Jacobson <owen@grimoire.ca>2024-01-03 03:05:23 -0500
commit5562e320736812d1ad309cfaf73383512a87858d (patch)
treed93569bd8831f4ea5b90719a61a9d1b217e76b0f /docs/git/scratch.md
parent27d5717529bf0e7d5806982f1970603bad998eaf (diff)
Migrate to Hugo.
This is a big and somewhat complicated decision, but the crux of it is this: The _mkdocs_ tool embeds a ton of "I am writing a manual" assumptions about document structure. These assumptions include that there is a single, sitewide TOC, that a top nav bar is broadly an appropriate way to skip around in the document, and numerous others. They serve that use case well, but that's not really what this site _is_, or how I intend it to be approached. I'm trying for something more blog-esque (and deliberately a bit haphazard). Hugo is an experiment. This commit migrates most pages to it, but it does drop a few; this is a convenient excuse to forget items I'd prefer not to continue publishing.
Diffstat (limited to 'docs/git/scratch.md')
-rw-r--r--docs/git/scratch.md55
1 files changed, 0 insertions, 55 deletions
diff --git a/docs/git/scratch.md b/docs/git/scratch.md
deleted file mode 100644
index e912a1e..0000000
--- a/docs/git/scratch.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Git Is Not Magic
-
-I'm bored. Let's make a git repository out of whole cloth.
-
-Git repos are stored in .git:
-
- fakegit$ mkdir .git
-
-They have a “symbolic ref” (which are text files, see [`man
-git-symbolic-ref`](http://jk.gs/git-symbolic-ref.html)) named `HEAD`, pointing
-to the currently checked-out branch. Let's use `master`. Branches are refs
-under `refs/heads` (see [`man git-branch`](http://jk.gs/git-branch.html)):
-
- fakegit ((unknown))$ echo 'ref: refs/heads/master' > .git/HEAD
-
-The have an object database and a refs database, both of which are simple
-directories (see [`man
-gitrepository-layout`](http://jk.gs/gitrepository-layout.html) and [`man
-gitrevisions`](http://jk.gs/gitrevisions.html)). Let's also enable the reflog,
-because it's a great safety net if you use history-editing tools in git:
-
- fakegit ((ref: re...))$ mkdir .git/refs .git/objects .git/logs
- fakegit (master #)$
-
-Now `__git_ps1`, at least, is convinced that we have a working git repository.
-Does it work?
-
- fakegit (master #)$ echo 'Hello, world!' > hello.txt
- fakegit (master #)$ git add hello.txt
- fakegit (master #)$ git commit -m 'Initial commit'
- [master (root-commit) 975307b] Initial commit
- 1 file changed, 1 insertion(+)
- create mode 100644 hello.txt
-
- fakegit (master)$ git log
- commit 975307ba0485bff92e295e3379a952aff013c688
- Author: Owen Jacobson <owen.jacobson@grimoire.ca>
- Date: Wed Feb 6 10:07:07 2013 -0500
-
- Initial commit
-
-[Eeyup](https://www.youtube.com/watch?v=3VwVpaWUu30).
-
------
-
-Should you do this? **Of course not.** Anywhere you could run these commands,
-you could instead run `git init` or `git clone`, which set up a number of
-other structures, including `.git/config` and any unusual permissions options.
-The key part here is that a directory's identity as “a git repository” is
-entirely a function of its contents, not of having been blessed into being by
-`git` itself.
-
-You can infer a lot from this: for example, you can infer that it's “safe” to
-move git repositories around using FS tools, or to back them up with the same
-tools, for example. This is not as obvious to everyone as you might hope; people