Hacker Newsnew | past | comments | ask | show | jobs | submit | cerved's commentslogin

Worktrees effectively share the entire state of the repo. Only limitation is that a branch can only be checked out in one repo at a time.

Clones only share the immutable object store

For most practical uses of same repo checking out different branches locally, worktrees are better.

The nice thing about clones is that you can have a backup clone, a wip clone, a review clone where you don't clutter the amount of local branch refs


ofc if you're running AI agents in YOLO mode — clones means you don't need to worry that Sonnet is going to see your .git/index.lock file and go "this is blocking me, let's rm -f this" and corrupt all your work that you never bothered pushing

you can also setup a local remote which hardlinks the index so it doesn't occupy more space. Why? Idk. You don't want to share stash, rerere-cache, branches whatever.

Also handy if you're running an agent in a container on the local fs. Set up a local clone, contain the agent to that repo folder and have it hack away on that. Later, you step out of the container and do the syncing. You can't use worktrees in this situations.

Bare repos are also pretty cool. You can clone the git mailing list as a bare repo and search for threads there instead of setting up an mbox (same for the kernel obviously)


At that point you might as well use a worktree[1].

[1]: https://git-scm.com/docs/git-worktree


You can't use a worktree without write access to the shared object database. You can use worktrees, or you can containerize your agents, but you can't do both.


Doesn't work. You need to mount both the worktree and the repo which defeats the point

> hardlinks the index

I think you mean hardlinks the object database? The index (staging area) changes constantly. Not much point in hardlinking it.

Hardlinking the object database is the default behavior with you clone locally on linux. It's great for one-off clones such as CI/CD pipelines and agentic containers, but the benefit in terms of disk space saved is short-lived: as repos evolve independently, they replace their packfiles with new ones, and the new ones will not be hardlinked because they don't contain the same objects.

I like to keep bare repositories in dropbox, but I use `--no-hardlinks` when cloning, because before I did that, on one occasion, dropbox corrupted the bare repo, and my working repo was corrupted as a result.


which harness has actual containment controls and not just suggestions?


Fwiw you can create your own trailers

    Yolo-Slopped-By: Sonnet-4.5 <claude@anthropic.com>
https://git-scm.com/docs/git-interpret-trailers


if you want to reason about language correctness you are better off using linters, compilers and things like fuzzing

> the trend is AI also does the code review

please no. Keep at least four eyes on all code you ship


Anthropic obviously vibe code everything and it shows


You use gh to interact with the forge, git to interact with the repo.

For example

  gh pr checks --watch
will run and poll the CI checks of a PR and exit 0 once they all pass


Anthropic should run it on their own code


For $380B you can get both AT&T and Verizon and you pay ~1.55x the revenue. Why pay 38x for Starlink?


What do you mean $380B? This "fair market value" forecast also includes $147B for starlink enterprise and $75B for starlink direct-to-cell. So almost $600B all in.


> Starlink Consumer Broadband at $380B (9.2M subscribers, ~38x revenue)

I mean that Starlinks consumer broadband is valued at ~38x revenue, when other telcos are valued around 1.5x revenue. That revenue is 2533% more expensive, why pay such a big premium for something that's essentially the same?


Starlink is less than 10 years away from providing full data services to cellphones globally, allowing them to offer a better service at a cheaper rate to AT&T and Verizon. Not to mention more coverage.

Also, AT&T and Verizon customers don't love their provider. They despise them. I walked into a Verizon store last year and was outright scammed by the staff member into their insurance plan after explicitly declining it (they just added it to the bill anyway).

These legacy companies will be irrelevant.


> Starlink is less than 10 years away from providing full data services to cellphones globally

10 years is a long time, considering the global reactions to America under Trump, and also Musk's tight coupling to Trump, and even in the US given how many bridges Musk burned.

If Starlink was properly spun off and independent of Musk this would be much less of an issue, but now? Now the rest of the world is likely to treat it like the US treats Huawei.


Tip, you may want to use origin/HEAD over origin/master


Is it the naming-independent identifier of the tip of the trunk?


not strictly speaking, but in practice it's the tip of the remote default branch


It does


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: