I want to add the following text somewhere, where would be a good place? (after clean up of course)
Quick guide to git workflow specific to nixpkgs (as it relates to its humongous size)
This is a big repo and some might not be very comfortable downloading the entire repo with history which is a couple of GBs. Git allows one to download a “shallow” copy of the repository by the means of which you can download only the current
HEAD (Currently ONLY ~200MB). Full treatment of the “shallow” checkout related commands is outside the scope of this document but here’s some very quick overview of commands that may help you work with this repo. (As with git and any other system- commands differ based on situation and be wary of data loss if you don’t understand what you’re doing).
# The following command checks out only the HEAD of this repository git clone --depth=1 https://github.com/NixOS/nixpkgs # Create a branch locally and on the Github fork with the same name. After making and committing changes, push using: git checkout -b myPackageEdit1 git push -f -u <REMOTE NAME> <branch name> # Make further changes. # Extend commit by staging the changes and running the following command, then push again. $ git commit --amend --no-edit $ git push -f -u <REMOTE NAME> <BRANCH NAME> ────────────────────────────────────────── # To refresh to repository for next PR, the following commands update the repository to contain only the latest HEAD commit. # 2 points to note # 1) This erases local changes. So beware. # 2) If space itself is an issue too, also lookup `git gc` and `git repack` git checkout master git fetch --depth 1 git reset --hard origin/master # Now, do a bit of github acrobatics. # Bring your github fork up-to-date with the original nixos fork. # Go to this link https://github.com/<your github user>/nixpkgs/compare/master...NixOS:master # Submit a pull request which would bring your github fork up to date. # Find the commit id in your computer's latest checkout. # Browse to that id in github's interface and browse files. # Create a new branch from that commit id on the github fork. # Create a new local branch using `checkout -b`. Work and commit as above The always-innovative nix maintainers also plan to investigate applicability of sparse cloning and checkouts later (help is welcome).