Urgent.News

What's breaking now, across thousands of outlets.

Tech

What is a git worktree: how it works internally and when to use it

A git worktree is an additional working directory for the same repository: a second folder with its own files, its own active branch, and its own staging, which shares the history, branches, and configuration with the original folder. With it, you can have main open in one folder and feature/login in another at the same time, without cloning the repository twice and without having to stash every time…

Translated from Spanish Read in Spanish

A git worktree is an additional working directory of the same repository, allowing multiple branches to be worked on simultaneously. It was introduced in git 2.5 in 2015 and enables users to have multiple active branches, such as main and feature/login, in separate folders. A git worktree has its own HEAD, index, and files but shares commits, branches, configuration, and hooks with the main worktree. It does not duplicate the repository's history, making it a quick and efficient solution.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

What is a git worktree: how it works and when to use one

A git worktree is an additional working directory of the same repository: a second folder with its own files, its own checked-out branch and its own staging area, which shares the history, the…

  • Git worktree shares repository, branch, and config with main directory
  • Object database and references are common across all worktrees
  • Each worktree has unique working state with own HEAD, index, files

The Rehearsal Layer — Or, an Escrow You Have Never Opened Is Indistinguishable from No Escrow

Yesterday's piece ended with a test: four items, PASS / FAIL / UNKNOWN, UNKNOWN counts as FAIL. It was a good test as far as it went. It had a hole, and the hole is the whole subject of today.

  • Rehearsal uncovers escrow differences, indistinguishable until needed
  • Drills costly, uncertain benefit, perceived cost outweighs benefit
  • Regular drills improve preparedness, resilience, document results

More from Wednesday 28 October →