# Nix monorepo size and contribution

**URL:** https://discourse.nixos.org/t/nix-monorepo-size-and-contribution/5565
**Category:** Development
**Created:** [January 20, 2020, 6:05am UTC](https://discourse.nixos.org/t/nix-monorepo-size-and-contribution/5565 "2020-01-20T06:05:45Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![KoviRobi](https://discourse.nixos.org/user_avatar/discourse.nixos.org/kovirobi/32/33578_2.png) [@KoviRobi](https://discourse.nixos.org/u/KoviRobi)
#### Post date: [January 21, 2020, 4:59pm UTC](https://discourse.nixos.org/t/nix-monorepo-size-and-contribution/5565/8 "2020-01-21T16:59:12Z")

</div>

A related, but not entirely same thing, is when I have multiple PRs ongoing, I don’t want to have multiple checkouts of the entire repo. This is where git worktrees come in handy: I have a bare checkout, and multiple worktrees, e.g.:

```bash
mkdir ~/programming/nix/nixpkgs
cd ~/programming/nix/nixpkgs
git clone https://github.com/KoviRobi/nixpkgs --bare .git
# you can do `git remote add upstream https://github.com/NixOS/nixpkgs
# Add worktrees for each ongoing pull request
git worktree add -b foo-init-at-1.0.0 ./foo-init-at-1.0.0
# cd into ./foo-init-at-1.0.0 and do stuff, you can pretty much treat it as a checkout
git worktree add -b bar-update-1.0.0-to-2.0.0 ./bar-update-1.0.0-to-2.0.0
# etc
# $ du -sh * .* [1/69]
# 123M bar-update-1.0.0-to-2.0.0                                                                                                                             
# 123M foo-init-at-1.0.0
# 1.1G .git # the full git repo, the worktrees only consume the actual checkout's worth of space

```

---

_[View the full topic](https://discourse.nixos.org/t/nix-monorepo-size-and-contribution/5565)._
