GIT-PKGS(1)
π 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
--pathwhen you've got a local checkout and you want the dep to point right at it π«Ά - use
--gitwith an optional--refwhen your source lives in a git repo β--refis the branch/tag/revision, so yes you can absolutely point it atfix-branchand live your truth π - or just pass a version and it falls through to the package manager's
addoperation. 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[defaultfalse] β remove an existing replacement. it's the undo button, the "never mind", the anti-redirect. π--dry-run[defaultfalse] β 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[defaultfalse] β help forreplace. the classic. π-m,--manager=""β override the detected package manager, and heads up: this takes precedence over-e. so if you set both,-mwins. 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 to5m0sβ 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 areauto,always, andnever. default isauto.--include-submodules[defaultfalse] β include git submodules when scanning for manifests. off by default, so submodules stay in their lane unless invited.-p,--pager[defaultfalse] β use pager for output. off by default.-q,--quiet[defaultfalse] β 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:--pathfor local,--git+--reffor git, a bare version to hand off to the package manager, and--dropwhen 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
- nixpkgs unstable: git-pkgs 0.21.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms