I like how the author is proceeding and how they explain the changes in the .git directory, but I think they’re overcomplicating things a little.
They’re mixing and messing definitions and concepts and separation together and then get confused because of it. It describes a behavior analysis discovery but lacks the useful, valid discovery. I don’t think this is useful for others to read, and detrimental for git newbies, because it’s more difficult and confusing than helpful.
- git says HEAD defines the current branch
- rebase is a process operating on commits and branches - it breaks out of the simple “current repository state” because there’s a process and process state around that. They notice things being different, but fail to elevate their view or discover that they have to interpret it differently.
- bare repository has no workspace - as such, workspace commands won’t work, and there is no workspace current branch. HEAD defines the default/main branch.
And they never ger into the got worktree subcommand and probably don’t know you can have multiple things checkedout at once in a different Dir but still all pointing to the same local git clone.
Also with them you can have a bare repo with multiple worktrees at once. Have been working this way for a few months now and it is very nice when switching branches as that becomes a simple cd instead of a git switch or checkout. Which means you don’t need to stash any pending changes before you switch branch.