← Back to Blog

Developers & Code | Jun 27, 2026 | 7 min read

How to Pin Long Monorepo Paths You Reuse

By Deepender Yadav

How to Pin Long Monorepo Paths You Reuse — Edge Drop Guide

A monorepo is a single git repository that holds multiple projects, packages, or services. The repository's root is shared, and each project lives in a subdirectory. The subdirectories are often deep — three, four, or five levels — because the monorepo's structure mirrors the organisation: platform/frontend/web/apps/dashboard/src/components/. A developer who works in the dashboard every day types or copies that path dozens of times: to open a file, to run a test, to reference a path in a ticket, to paste into a terminal as a cd argument. Each round-trip to Explorer to "Copy as path" is a tax. The fix is to pin the five to ten paths the developer actually uses, so they are one paste away instead of one browsing session away. This guide covers the workflow and the Windows long-path considerations that make it necessary.

For neighbouring topics, see gists vs clipboard for sharing throwaway code, how to keep a repro command next to its screenshot, and best clipboard habits for developers in 2026. For path-related mechanics, see how to copy a file path that works in the terminal and git paths, SHAs, and PR URLs: a pin set.

Why monorepo paths are long

A monorepo's directory structure is the product of two forces: the desire to keep related code together, and the desire to keep the structure scalable as the organisation grows. The first force produces a deep tree; the second force produces a tree that gets deeper over time.

A typical monorepo layout, simplified:

monorepo/
├── apps/
│   ├── web/
│   │   ├── dashboard/
│   │   │   ├── src/
│   │   │   │   ├── components/
│   │   │   │   ├── pages/
│   │   │   │   └── utils/
│   │   │   └── tests/
│   │   ├── marketing/
│   │   └── admin/
│   ├── mobile/
│   └── desktop/
├── packages/
│   ├── ui-kit/
│   ├── api-client/
│   └── config/
├── tools/
│   ├── build/
│   └── scripts/
└── docs/

A path to a component in the dashboard app is monorepo/apps/web/dashboard/src/components/Header.tsx. On Windows, with the user's home directory factored in, the full path is something like C:\Users\name\dev\monorepo\apps\web\dashboard\src\components\Header.tsx — 60 characters, manageable. A path to a deep utility is C:\Users\name\dev\monorepo\apps\web\dashboard\src\utils\format\currency\index.ts — 70 characters. With a longer home directory or a longer project name, paths can exceed 100 characters and approach Windows' historic 260-character limit.

The Windows 260-character limit

Windows has had a 260-character path limit (MAX_PATH) since the Win32 API was designed. The limit applies to most file APIs unless the application opts in to extended-length paths by prefixing the path with \\?\. The opt-in is per-application, not system-wide.

Windows 10 version 1607 (2016) introduced a setting to remove the MAX_PATH limit for opt-in applications system-wide: Enable Win32 long paths in Group Policy, or the LongPathsEnabled registry value under HKLM\SYSTEM\CurrentControlSet\Control\FileSystem. When enabled, applications that opt in can use paths up to 32,767 characters.

Most modern developer tools (git, Node.js, VS Code, Windows Terminal) opt in to long paths when the system setting is enabled. Older tools and some shell utilities do not. The result is that long paths work in most places but fail in a few, which is a confusing failure mode.

The practical implication: a monorepo with paths over 260 characters may work on a developer's machine if long paths are enabled, and may fail on a teammate's machine if they are not. The check is git config --get core.longpaths (should be true) and the registry value.

For more on the registry setting, see the Microsoft Learn source at the end of this article. Do not edit the registry without confirming the setting name; the official documentation is the reference.

The recopy-from-Explorer tax

Without pinned paths, the workflow for opening a deep file in a monorepo is:

  1. Open Explorer.
  2. Navigate to the monorepo root.
  3. Click through five or six folders to reach the target.
  4. Shift+right-click → Copy as path.
  5. Paste into the terminal or IDE.

Each step takes a few seconds. Across a day, with dozens of file opens, the tax adds up to minutes. More importantly, the tax is paid in attention: the developer's flow is interrupted by the navigation, even if the navigation is fast.

With pinned paths, the workflow is:

  1. Win+V (or a shelf), click the pinned path.
  2. Paste into the terminal or IDE.

Two steps, no navigation. The tax is paid once when the path is pinned, and never again.

What to pin

The pinning strategy depends on the developer's working set. The candidates:

  • The project root. C:\Users\name\dev\monorepo. Used for cd commands, git operations, and as a base for relative paths.
  • The current feature's directory. monorepo\apps\web\dashboard\src\components. Used during active development of a feature.
  • The test directory. monorepo\apps\web\dashboard\tests. Used for running and inspecting tests.
  • The package directory. monorepo\packages\ui-kit. Used when working on a shared package.
  • The build output directory. monorepo\apps\web\dashboard\dist. Used when inspecting build output.
  • The docs directory. monorepo\docs. Used when updating documentation.

A working set of five to ten paths covers most daily activity. The set changes as the developer moves between features; the pins should be updated when the working set changes.

Where to pin

The two pinning locations:

Win+V history

Windows clipboard history (Win+V) supports pinning. A pinned item stays in history across the 25-item eviction and across restarts. To pin a path:

  1. Copy the path (Shift+right-click → Copy as path in Explorer).
  2. Open Win+V.
  3. Click the ... next to the path item.
  4. Click Pin.

The path stays at the top of the history until unpinned. Up to 25 items can be in history, including pinned items. Pinning five paths leaves 20 slots for transient copies, which is usually enough.

The limitation: Win+V does not support labelling or grouping. The pinned paths appear as raw text, distinguished only by their content. A pinned path that is similar to another pinned path is hard to tell apart at a glance.

A clipboard shelf or notes file

A clipboard shelf (Edge-Drop or similar) holds items side by side, with optional labels. The shelf is a better fit for paths because the developer can see all the pinned paths at once and pick the right one.

The alternative, for developers who do not use a shelf, is a notes file:

# daily-paths.md

- Dashboard components: C:\Users\name\dev\monorepo\apps\web\dashboard\src\components
- Dashboard tests: C:\Users\name\dev\monorepo\apps\web\dashboard\tests
- UI kit: C:\Users\name\dev\monorepo\packages\ui-kit
- Build output: C:\Users\name\dev\monorepo\apps\web\dashboard\dist
- Docs: C:\Users\name\dev\monorepo\docs

The notes file is opened in an editor alongside the terminal. The developer copies the relevant path and pastes into the terminal. The notes file is updated when the working set changes.

Path format considerations

The path format that Explorer's "Copy as path" produces is a quoted Windows path: "C:\Users\name\dev\monorepo\apps\web\dashboard". Most Windows tools accept this format, but some do not:

  • PowerShell — accepts quoted Windows paths. cd "C:\Users\name\dev\monorepo\apps\web\dashboard" works.
  • cmd — accepts quoted Windows paths. cd /d "C:\Users\name\dev\monorepo\apps\web\dashboard" works (the /d is needed to change drives).
  • bash (WSL or Git Bash) — wants forward slashes and Unix-style paths. C:\Users\name\dev\monorepo becomes /c/Users/name/dev/monorepo (Git Bash) or /mnt/c/Users/name/dev/monorepo (WSL).
  • VS Code — accepts either. code "C:\Users\name\dev\monorepo" opens the folder.

A developer who works across Windows tools and WSL needs two pinned paths per location: one in Windows format and one in WSL format. Alternatively, they pin the Windows format and convert in the terminal with wslpath.

For more on path conversion, see WSL and Windows clipboard: what crosses the boundary and how to copy a file path that works in the terminal.

The repro-command pairing

A pinned path is more useful when paired with the command that uses it. The pattern: pin the path and the command together as a single string, ready to paste into a terminal.

cd C:\Users\name\dev\monorepo\apps\web\dashboard && npm test -- --grep "Header"

This is a single paste that takes the developer to the directory and runs the test. The pinned item is not just a path; it is a small workflow.

For more on this pattern, see how to keep a repro command next to its screenshot and batching copies before you switch windows.

When paths change

Monorepo paths change when the structure is reorganised — a package is renamed, a directory is moved, a project is split out. The pinned paths become stale and the developer has to re-pin.

The mitigation: pin paths that are stable (the project root, the docs directory) and treat feature-specific pins as ephemeral. When a feature is finished, unpin its paths. When a new feature starts, pin the new paths.

A weekly pin review — five minutes at the end of the week, removing stale pins and adding new ones — keeps the pin set current. For more on this habit, see a weekly pin review beats infinite history and the three-bucket model: ephemeral, pinned, archived.

A short checklist

  • Pin the five to ten paths you actually use daily.
  • Use Win+V pinning for a quick win, or a clipboard shelf / notes file for labelled storage.
  • Pair paths with their commands for one-paste workflows.
  • Maintain two formats (Windows and WSL) if you work across both.
  • Review pinned paths weekly; remove stale, add current.
  • Enable long-path support if any monorepo path exceeds 260 characters.

A dedicated walkthrough is Copying Commit Messages With the Right Wrap.

Related reading

Sources

Deepender Yadav
Written by Deepender Yadav · Author & Developer

Deepender Yadav is a B.Tech Computer Science Engineering student and software developer interested in building practical software and open-source projects.

GitHub · LinkedIn

Copy. Stack. Drop.

Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.

Download for Windows Get from Microsoft Store

How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge-Drop vs Win+V · Support

Free · Lightweight · Privacy First
Find us on CodeHype