From 00ffe7b51a33b717f333e06854aab1da7711d2e1 Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Fri, 16 Oct 2026 13:56:55 +0600 Subject: [PATCH] [2026-10-16] eagle: work/apple-browsers-worktree-workflow.md --- work/apple-browsers-worktree-workflow.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/work/apple-browsers-worktree-workflow.md b/work/apple-browsers-worktree-workflow.md index 53888c83..5a6ec95b 100644 --- a/work/apple-browsers-worktree-workflow.md +++ b/work/apple-browsers-worktree-workflow.md @@ -1,6 +1,6 @@ # Apple Browsers: Git worktrees -Keep one shared Git database at `~/DuckDuckGo/apple-browsers.git/.git` and put independent checkouts beside it inside `apple-browsers.git/`. The container directory has no checked-out source of its own. +A Git worktree is another checkout of the same repository. It lets you keep `main` and feature branches in separate folders, work on them independently, and share one Git history instead of cloning the repo again. In this setup, `apple-browsers.git/.git` stores that shared history; `main/` and feature folders are the worktrees. ## First-time setup @@ -13,8 +13,6 @@ git fetch origin git worktree add main main ``` -This matches the local layout: `.git/` holds shared history; `main/` is a normal checkout. Access to private dependencies may be needed to build; see `README.md` inside a checkout. - ## Work on a branch From `~/DuckDuckGo/apple-browsers.git`: @@ -27,6 +25,6 @@ git submodule update --init --recursive open DuckDuckGo.xcworkspace ``` -Edit, build, commit, and push **inside `my-feature/`** as with any clone. Each worktree has its own working files and branch; they share the same Git history. For an existing local branch, use `git worktree add `; for a remote branch, use `git worktree add --track -b origin/` if you have not created it locally. +The `git worktree add -b` command creates `my-feature/` on a new branch based on `origin/main`. Edit, build, commit, and push inside that folder. For an existing local branch, use `git worktree add `; for a remote branch, use `git worktree add --track -b origin/` if you have not created it locally. Use `git worktree list` to find checkouts. After checking that a checkout has no work to keep, run `git worktree remove ` from the container directory. The branch remains available.