Git worktrees are awesome but they broke my workflow in a couple ways:
Resuming work. I used to `j <reponame>` then `gco <branchname>`. Now if I do that I get an error about the branch being checked out already in another worktree. I realized the branch names are pretty unique across repos so I made ` jbr <branchname>` that works from anywhere.
Jumping within repo. The other kink was when I wanted to focus on a particular package I’d do `j <subdir>` and it would usually be unique enough to jump to the one in my current checkout. But now I have dozens of concurrent checkouts and have to pick, even though I’m already in the repo. So `jd <subdir>` does like autojump or zoxide but only within the current checkout.
To power those shell functions I made a “where” extension for Git.
I was on a date when she asked “do you like magnetic fields?”. “Yes!” and we were both smitten.
Took us a few conversational turns to realize we had different capitalization. (This was in the old days when courting was mostly by speaking in person.)
« Gen Zers, it turns out, are "not on a linear journey to evaluate the veracity of anything." Instead, they're engaged in what the researchers call "information sensibility" — a "socially informed" practice that relies on "folk heuristics of credibility." In other words, Gen Zers know the difference between rock-solid news and AI-generated memes. They just don't care. »
Resuming work. I used to `j <reponame>` then `gco <branchname>`. Now if I do that I get an error about the branch being checked out already in another worktree. I realized the branch names are pretty unique across repos so I made ` jbr <branchname>` that works from anywhere.
Jumping within repo. The other kink was when I wanted to focus on a particular package I’d do `j <subdir>` and it would usually be unique enough to jump to the one in my current checkout. But now I have dozens of concurrent checkouts and have to pick, even though I’m already in the repo. So `jd <subdir>` does like autojump or zoxide but only within the current checkout.
To power those shell functions I made a “where” extension for Git.
https://github.com/turadg/git-where
It’s working out nicely!