git worktree

(this is #bonuscomic #3 for "How Git Works" wizardzines.com/zines/git, covering some topics that I didn't talk about in the zine)

Also I don't use worktrees very rarely, so please reply with gotchas/tips about worktrees if you use them more!

Follow

@b0rk

They are excellent for scripts that want to create commits: if you create a new worktree at the beginning, do your stuff there, and destroy it at the end, the script doesn't need to figure out if the standard worktree is dirty and for sure won't have its behaviour affected by ignored files.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.