GIT-PKGS(1)

πŸ“¦ version 0.21.0, in nixpkgs unstable

πŸŽ€ GIT-PKGS-REPLACE πŸŽ€

okay bestie so you're looking at git-pkgs(1) β€” the Git Pkgs Manual, section 1, the whole git-pkgs family β€” and this specific page is all about one lil command that goes by git-pkgs-replace. yes it's giving very "the name is longer than the command" energy. πŸ’…


✨ NAME ✨

git-pkgs-replace β€” redirect a dependency to a local path, a git ref, or a version. that's it, that's the whole vibe. you're pointing a dep somewhere else for downstream testing, and honestly? iconic. πŸ¦‹


🌸 SYNOPSIS 🌸

git-pkgs replace  [version] [flags]

note the double space after replace β€” that's canon, we do not touch it, we do not "fix" it. 😌


πŸ’– DESCRIPTION πŸ’–

so the whole point, fr fr: you redirect a dependency to an alternative source so you can do downstream testing. like, you want to test your thing against a fork or a local checkout before it goes out into the world. main character energy for your dependency graph, lowkey.

here's how you pick your flavor of redirect:

  • use --path when you've got a local checkout and you want the dep to point right at it 🫢
  • use --git with an optional --ref when your source lives in a git repo β€” --ref is the branch/tag/revision, so yes you can absolutely point it at fix-branch and live your truth 🌈
  • or just pass a version and it falls through to the package manager's add operation. no cap, it just hands it off.

Examples β€” these are straight from the source, bestie, copy them exactly:

git-pkgs replace github.com/acme/lib --path ../lib
git-pkgs replace lodash --git https://github.com/fork/lodash --ref fix-branch
git-pkgs replace lodash 4.17.21
git-pkgs replace github.com/acme/lib --drop

see how the --ref fix-branch wrapped onto a new line up there? yeah. in the real page it's one line, and that's what I wrote for you. you're welcome. πŸ’œ


✨ OPTIONS ✨

here's every single flag, no skips, no "oops I forgot one", we don't do that here.

  • --drop [default false] β€” remove an existing replacement. it's the undo button, the "never mind", the anti-redirect. πŸ’€
  • --dry-run [default false] β€” show what would be run or edited without actually executing it. perfect for when you're feeling brave but like, not that brave. πŸ™ˆ
  • -e, --ecosystem="" β€” filter to a specific ecosystem. default is empty string, so it doesn't filter by default.
  • -x, --extra=[] β€” extra arguments to pass to the package manager. an empty list by default, so you're passing nothing unless you say so. πŸ“
  • --git="" β€” redirect the dependency to a git repository. empty by default.
  • -h, --help [default false] β€” help for replace. the classic. πŸ‘‘
  • -m, --manager="" β€” override the detected package manager, and heads up: this takes precedence over -e. so if you set both, -m wins. periodt. ⭐
  • --path="" β€” redirect the dependency to a local path. empty by default.
  • --ref="" β€” the git branch, tag, or revision for --git. it's the buddy of --git, so use them together, iykyk. 🧚
  • -t, --timeout=5m0s β€” timeout for the replace operation. defaults to 5m0s β€” that's five minutes, zero seconds, in case the Go duration format was giving you a moment. πŸ’…

πŸ¦‹ OPTIONS INHERITED FROM PARENT COMMANDS πŸ¦‹

these aren't even this command's flags, they're handed down from the parent, and yes we're listing all of them because we are thorough and we ate. πŸ”₯

  • --color="auto" β€” when to colorize output. the valid values are auto, always, and never. default is auto.
  • --include-submodules [default false] β€” include git submodules when scanning for manifests. off by default, so submodules stay in their lane unless invited.
  • -p, --pager [default false] β€” use pager for output. off by default.
  • -q, --quiet [default false] β€” suppress non-essential output. the "shhh" flag, honestly so real. 🀫

🌈 SEE ALSO 🌈

  • git-pkgs(1) β€” go say hi to the parent, bestie, it raised this whole family. 🫢

πŸ’œ HISTORY πŸ’œ

generated on 28-Oct-2026 by spf13/cobra, fully auto, no human hands. so if anything's weird, blame the generator, not me. 😭 (jk, the generator is serving.)


ngl, the biggest thing to remember: --path for local, --git + --ref for git, a bare version to hand off to the package manager, and --drop when you want it gone. everything else is seasoning. πŸŽ€

okay and finally, the cute sign-off you were promised: this page comes from git-pkgs in the Oct 2026 edition, and yep the whole thing is dated October 2026 β€” same month and year as that HISTORY line, which honestly is a slay. see you in the group chat, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from