GitWorktree.org logoGitWorktree.org
By GitWorktree.org7 min read

Does GitHub Know You're Using a Worktree?

GitHub treats every worktree push exactly like a regular branch push — the server has no idea you are using worktrees locally. We pushed from three worktrees, watched the GitHub UI, and inspected the receive-pack logs.

TL;DR

No. GitHub has no idea whether a push originated from a regular checkout or from a worktree. The Git protocol sends commits and refs — not local directory structure. GitHub treats every worktree push, branch, and pull request exactly like one from a vanilla clone. If you suspect otherwise, you are confusing local UX with what travels over the wire.

Why People Ask This

Two of the most-searched questions about git worktree on Google right now are “does GitHub know I am using a worktree?” and “does GitHub treat worktrees the same as branches?”. Both phrasings get around 1,700 monthly searches combined. Same anxiety, two angles: people are afraid that worktrees do something irreversible to their remote. They do not.

The confusion is reasonable. A worktree feels like a parallel universe of your repo — multiple folders, separate working directories, simultaneous edits. Surely somethingdifferent must show up on the remote, right? Let's look at what actually travels.

What Git Sends Over the Wire

When you run git push from inside a worktree, the client opens a connection to the remote and runs the git-receive-pack protocol. The payload is exactly three things:

  • The packfile of commits the remote does not have yet
  • The updated ref name (e.g. refs/heads/my-branch) and its new SHA
  • The previous SHA the ref pointed to, so the server can validate the update

That is it. No directory path. No working-tree state. No mention of .git/worktrees/ or which checkout the push originated from. The receive-pack protocol is documented in Git Protocol v2 and has nothing to say about worktrees. They are a purely local concept.

The Experiment: Pushing from Three Worktrees

To verify, we set up a test repo with three worktrees and pushed from each:

Pushing from three separate worktrees
# Main checkout
cd ~/projects/wt-test
git worktree add ../wt-test-feature -b feature/a
git worktree add ../wt-test-fix -b fix/b
git worktree add ../wt-test-docs -b docs/c

# Make a commit and push from each worktree
cd ../wt-test-feature && echo "feature" > f.txt && git add . && git commit -m "feature work" && git push -u origin feature/a
cd ../wt-test-fix && echo "fix" > x.txt && git add . && git commit -m "fix work" && git push -u origin fix/b
cd ../wt-test-docs && echo "docs" > d.txt && git add . && git commit -m "docs work" && git push -u origin docs/c

On the GitHub UI side, all three branches appeared in the branch list. Each push shows a normal author + committer pair. The contributors graph credits the commits to the user account, not to “worktree A” or “worktree B”. The branches list does not even hint that they came from different working directories.

Then we opened a PR from each. Same flow as always — title, description, base/compare, reviewers. No banner that says “PR opened from a worktree”. No special tag. Nothing.

Are Worktrees Treated The Same As Branches?

This is the second flavor of the question. The answer is: GitHub stores branches, not worktrees. A worktree is a local checkout of a branch. When you push that branch, the remote sees the branch — same data structure as if you had typed git checkout -b and committed normally. There is no parallel “worktree” object type in the GitHub API. Worktrees do not exist at the remote level at all.

If you want a sharper conceptual contrast, see our deep-dive on git worktree vs branch — branches are remote-visible; worktrees are local-only. They are orthogonal concepts that interact only at checkout time.

What GitHub Could Theoretically Detect (But Doesn't)

A determined fingerprinting effort could probably guess at worktree usage from indirect signals:

  • Multiple branches updated by the same user in the same short window (you can do this without worktrees too)
  • Pushes that share an unusual local-path hint in the commit message (only if you accidentally include it)
  • HTTP user-agent strings — but those identify the Git client, not its working directory

None of these would actually prove worktree usage, and none of them are used by GitHub for any feature we know about. The GitHub blog has covered Git workflows extensively and treats worktree as a local convenience, not a server feature.

The Practical Implications

Three useful conclusions you can act on:

  1. Use worktrees freely on shared repos. You will not introduce server-side oddities, weird metadata, or anything a teammate could notice from the GitHub UI.
  2. Branches are still the unit of collaboration. Push a worktree's branch to share it. The worktree itself stays on your machine. If you delete a worktree before pushing, the work is gone — branches survive deletion, worktrees do not.
  3. PR reviewers see normal diffs. No special handling needed on their side. Whether they review from VS Code or the GitHub web UI, the diff looks identical to any other PR.

Edge Case: Forks and Worktree Names

A small surprise: worktree names are local. If you run git worktree add ../wt-feature-x feature/x, the directory is called wt-feature-x on your machine. The remote sees only feature/x. So you can name your worktree directory whatever helps your file manager — ../client-acme, ../q4-launch, ../experiments-2026 — and the remote has zero visibility into that naming.

For directory-layout conventions that play well with teams, see our git worktree best practices guide.

Final Take

Worktrees are a local convenience layer over Git. They affect your file system, your IDE setup, and how many AI sessions you can run in parallel — but they do not change one byte of what GitHub stores. If you have been hesitating because you thought worktrees would leak into a shared repo, you can stop hesitating.

If you are ready to try one, start with git worktree add — the basic command takes 30 seconds to learn. Or see the Claude Code worktree workflow if you are running AI agents and want them in parallel without stepping on each other.