惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
J
Java Code Geeks
V
V2EX
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - Franky
爱范儿
爱范儿
T
Tailwind CSS Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
博客园_首页
B
Blog RSS Feed
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - allisonmahmood/NT: nt — git worktree quick-switc...
Allisonmahmo · 2026-06-26 · via Hacker News: Show HN

nt — navigate tree

Git worktrees, minus the ceremony. nt (short for navigate tree) is a tiny zsh command for hopping around worktrees: it spins one up — or jumps to it if it already exists — cds you in, and gets out of your way.

nt fix-login   # worktree up, cd'd in, go

Honestly? You should just ask your agent to build this for you — it's a 20-minute job. But if you're too scared to let it loose on your dotfiles, here you go.

Where the trees live

Worktrees sit right next to the main checkout in <repo>.worktrees/<branch> — no scattering them across /tmp, no losing track of where they went:

~/Developer/
  acme/                       <- the main checkout
  acme.worktrees/
    fix-login/                <- nt fix-login
    team/issue-123-thing/     <- nt team/issue-123-thing

Install

# clone is already at ~/Developer/nt
echo 'source ~/Developer/nt/nt.plugin.zsh' >> ~/.zshrc
exec zsh        # or open a new tab

That one source line defines the nt command and wires up tab completion (it adds completions/ to fpath and registers _nt, even when compinit has already run — as it has under oh-my-zsh). One line. Done.

Usage

Command What it does
nt <branch> [base] spin up / jump to a worktree and cd in
nt cd [branch] cd to an existing worktree (fzf picker if no branch)
nt rm [-f] [target] nuke a worktree (fzf picker if no target)
nt home cd back to the main checkout, wherever you are
nt ls list this repo's worktrees
nt / nt -h list + hint / full usage

Point it at a branch

The argument is the branch you want to be on, and nt figures out the rest — always pulling the latest from origin so you're never stranded on some stale local copy:

  • new name → new branch off the latest origin/main (it fetches first)
  • exists on origin (e.g. nt team/issue-123-foo) → worktree tracking origin/team/issue-123-foo at its latest
  • exists locally → checks the branch out in a fresh worktree, fast-forwarded to origin when that's a clean FF. Diverged local commits? Kept, never clobbered — it just tells you and uses your copy.
  • already has a worktree → skips the theatrics and cds you there
  • nt <name> <base> → fork the new branch off an explicit base instead

Tab completion

  • nt <tab> → subcommands (cd / rm / home / ls) plus existing branch names
  • nt cd <tab> → branches that currently have a worktree
  • nt rm <tab> → every worktree except the main checkout, plus -f. Branch-backed worktrees show by branch name; branch-less (detached) ones — say, created by some other tool — show by full path so they're still reachable.
  • nt <branch> <tab> → branches, to pick a base

Notes & knobs

  • New branches are created --no-track, so a stray git push/git pull won't accidentally nuke main. Push with -u when you're ready.
  • NT_NO_FETCH=1 nt foo skips the network fetch (offline, or just impatient).
  • A local branch is only ever fast-forwarded to origin when it's a clean FF — your diverged local commits are never touched.
  • nt rm <target> takes a branch name, a full worktree path, or a unique path tail (the last path component, usually). An ambiguous tail is refused, with the matches listed. No target → fzf picker over every worktree but the main checkout. Either way it flat-out refuses to remove the main checkout, and if you rm the worktree you're standing in, it steps you back home first.
  • Worktree location is one line in nt.plugin.zsh — change it if you hate it: root="${main_dir:h}/${repo_name}.worktrees".

Tests

  • test/test_nt.zsh — end-to-end behaviour against throwaway repos
  • test/test_completion.zsh — completion registration + candidate generation

MIT.